Commit 1b036240 authored by Vitaly Lipatov's avatar Vitaly Lipatov

gpush: use first param as workaround

parent 608d9447
...@@ -9,6 +9,7 @@ test -r "$1" && fatal "Do not need any files in params" ...@@ -9,6 +9,7 @@ test -r "$1" && fatal "Do not need any files in params"
PUSHFORCE= PUSHFORCE=
PUSHALL= PUSHALL=
TAGSALL= TAGSALL=
NEWGIRAR=
############################# #############################
Usage="Usage: $name [GIRAR/remote alias] [-f|--force] [-a|--all] [-t|--tags] [tag]" Usage="Usage: $name [GIRAR/remote alias] [-f|--force] [-a|--all] [-t|--tags] [tag]"
...@@ -43,10 +44,17 @@ if [ $# -gt 0 ]; then ...@@ -43,10 +44,17 @@ if [ $# -gt 0 ]; then
shift $((OPTIND - 1)) shift $((OPTIND - 1))
fi fi
LISTARGS=$@ LISTARGS="$@"
#LISTARGS=$(drop_args "$*" f a t)
} }
# Skip first param
if ! echo "$1" | grep -q "^-" ; then
NEWGIRAR="$1"
shift
fi
mygetopts $@ mygetopts $@
...@@ -70,7 +78,7 @@ tune_girarlist() ...@@ -70,7 +78,7 @@ tune_girarlist()
REMOTELIST="$(get_remote_git_list)" REMOTELIST="$(get_remote_git_list)"
NEWGIRAR=$1 [ -n "$NEWGIRAR" ] || NEWGIRAR="$1"
# If run with gear as param # If run with gear as param
if [ -n "$NEWGIRAR" ] ; then if [ -n "$NEWGIRAR" ] ; then
......
...@@ -64,7 +64,7 @@ while getopts :hfstcuUdnop:a:b:z opt; do ...@@ -64,7 +64,7 @@ while getopts :hfstcuUdnop:a:b:z opt; do
h) phelp; exit 0;; h) phelp; exit 0;;
s) SIGN=1 ;; s) SIGN=1 ;;
t) SIGNTAG=1 ;; t) SIGNTAG=1 ;;
f) FORCE="--force" ;; f) FORCE="-f" ;;
# FIXME: handle SIGN separately # FIXME: handle SIGN separately
c) CHECKONLY=1 ; SIGN=1 ;; c) CHECKONLY=1 ; SIGN=1 ;;
u) UPLOADNOW=1 ; SIGN=1 ;; u) UPLOADNOW=1 ; SIGN=1 ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment