diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-07-28 13:07:25 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-07-28 13:07:25 -0400 |
commit | e99b6a131ea08829da26d62d498c33f3129683e3 (patch) | |
tree | a891b899cb68f613641ec8ba54d6e015c5e45275 | |
parent | 804e2505cf4474791537a9f0ae8e9b6c274cb0c2 (diff) |
scripts/repo-add: show usage when no DB file specified
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r-- | scripts/repo-add.sh.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index c598ad9b..48f221b8 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -609,8 +609,12 @@ while (( $# )); do shift done - REPO_DB_FILE=${args[0]} +if [[ -z $REPO_DB_FILE ]]; then + usage + exit 1 +fi + LOCKFILE=$REPO_DB_FILE.lck verify_repo_extension "$REPO_DB_FILE" >/dev/null |