One more fix around using external repository.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 23 Apr 2013 14:02:23 +0000 (16:02 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 23 Apr 2013 14:02:23 +0000 (16:02 +0200)
mock.sh

diff --git a/mock.sh b/mock.sh
index 5ec4d64..2ab6c7a 100755 (executable)
--- a/mock.sh
+++ b/mock.sh
@@ -294,13 +294,14 @@ EOF
                ;;
 
        add)
+               shift
                FILES=$@
                if test -z "$FILES"; then
                        echo "Usage: $0 push { FILE.rpm... | FILE.changes... }"
                        exit 1
                fi
 
-               for file in $FILES; do shift; add $file; done
+               for file in $FILES; do add $file; shift; done
                ;;
 
        *)
@@ -312,7 +313,7 @@ EOF
                ;;
        esac
 
-       shift
+       shift || :
 done
 
 release_sign