[PATCH modular] release.sh: Generate error for missing arguments
Dirk Wallenstein
halsmit at t-online.de
Sun Mar 13 03:35:16 PDT 2011
All three arguments are required. Otherwise git-rev-list will abort the
script silently.
Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>
---
release.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/release.sh b/release.sh
index e8ea013..1cfff07 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
--
1.7.3.2
More information about the xorg-devel
mailing list