From b8548c9e528c996115aa42821b6ff6d896def092 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 15 Dec 2012 16:27:59 +0000 Subject: minor tweaks git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@568 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- publish-purge | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/publish-purge b/publish-purge index b573c4f..02984ad 100755 --- a/publish-purge +++ b/publish-purge @@ -38,7 +38,7 @@ cleanit() usage() { cat << EOF -usage: $0 [OPTIONS] +Usage: $0 [OPTIONS] OPTIONS: -h Show this message. @@ -62,6 +62,9 @@ while getopts "hnv" OPTION; do v) optVerbose=$(($optVerbose + 1)) ;; + *) + usage >&2 + exit 1 esac done @@ -71,12 +74,12 @@ base="" [ -e ~/.publish-purge.cfg ] && . ~/.publish-purge.cfg if [ -z "$base" ]; then - echo >&2 "$0: Please setup \$base in ~/.publish-purge.cfg" + echo >&2 "$0: Please setup \$base in ~/.publish-purge.cfg." exit 1 fi if ! [ -e "$base" ]; then - echo >&2 "$0: $base does not exist or is not a directory" + echo >&2 "$0: $base does not exist or is not a directory." exit 1 fi @@ -84,7 +87,7 @@ cd "$base" # We would not like to accidentily delete files in the wrong directory, hence # the paranoia check if ! [ -e .publish-purge.token ]; then - echo >&2 "$0: Place a .publish-purge.token in $base" + echo >&2 "$0: Place a .publish-purge.token in $base." exit 1 fi -- cgit v1.2.3