Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=8b461279e42976a2cb6f4e0af532839c614b143a

commit 8b461279e42976a2cb6f4e0af532839c614b143a
Author: Michel Hermier <herm...@frugalware.org>
Date:   Mon Nov 2 21:19:45 2009 +0100

repoman

* Fix issue with handling command introduced with command checking.
Now we eat all the options and try to run one command (as it should
allways had to be).

diff --git a/repoman b/repoman
index abbaecc..9641e91 100755
--- a/repoman
+++ b/repoman
@@ -817,7 +817,7 @@ fi
reponame=${repos[0]}

while [ "$1" != "" ]; do
-       case $1 in
+       case "$1" in
-h|--help)
usage
exit 0
@@ -844,6 +844,15 @@ while [ "$1" != "" ]; do
usage
exit 1
;;
+               *)
+                       break
+               ;;
+       esac
+       shift
+done
+
+if [ "$1" != "" ]; then
+       case "$1" in
cl|changelog)
shift 1
changelog $*
@@ -863,7 +872,6 @@ while [ "$1" != "" ]; do
ls|list)
shift 1
list $*
-                       exit 0
;;
m|merge)
shift 1
@@ -903,5 +911,9 @@ while [ "$1" != "" ]; do
exit 1
;;
esac
-       shift 1
-done
+else
+       echo "No command given"
+       exit 1
+fi
+
+exit 0
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to