summaryrefslogtreecommitdiff
path: root/publish-purge
diff options
context:
space:
mode:
Diffstat (limited to 'publish-purge')
-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