summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2012-12-15 16:27:59 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2012-12-15 16:27:59 +0000
commitb8548c9e528c996115aa42821b6ff6d896def092 (patch)
treeebc0311b680c52cb95474ec9434dc2aade5bc5bb
parente214e59fa9cf7c2f31bae358bb6d5522aee6976e (diff)
minor tweaks
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@568 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xpublish-purge11
1 files 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