scripts/repo-add: show usage when no DB file specified

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
Dave Reisner 2011-07-28 13:07:25 -04:00
parent 804e2505cf
commit e99b6a131e

View file

@ -609,8 +609,12 @@ while (( $# )); do
shift shift
done done
REPO_DB_FILE=${args[0]} REPO_DB_FILE=${args[0]}
if [[ -z $REPO_DB_FILE ]]; then
usage
exit 1
fi
LOCKFILE=$REPO_DB_FILE.lck LOCKFILE=$REPO_DB_FILE.lck
verify_repo_extension "$REPO_DB_FILE" >/dev/null verify_repo_extension "$REPO_DB_FILE" >/dev/null