summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Wallenstein <halsmit@t-online.de>2011-03-13 11:35:16 +0100
committerJulien Cristau <jcristau@debian.org>2011-03-23 12:42:40 +0100
commitef78b200dd7898b4fd8a193b2bb95cd14c0d61a2 (patch)
tree2ade95b36f43ba844378e577d67d634d53fdb377
parent5c5afe38845406ae87609842fd8bc8837d4c5f26 (diff)
release.sh: Generate error for missing arguments
All three arguments are required. Otherwise git-rev-list will abort the script silently. Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Julien Cristau <jcristau@debian.org>
-rwxr-xr-xrelease.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/release.sh b/release.sh
index df1caf8..03687ac 100755
--- a/release.sh
+++ b/release.sh
@@ -120,15 +120,15 @@ while [ $# != 0 ]; do
exit 1
;;
*)
+ if [ $# != 3 ]; then
+ echo "error: invalid argument count"
+ usage
+ exit 1
+ fi
section="$1"
tag_previous="$2"
tag_current="$3"
shift 3
- if [ $# != 0 ]; then
- echo "error: unknown parameter"
- usage
- exit 1
- fi
;;
esac
done