Commit bc85a420 authored by Vitaly Lipatov's avatar Vitaly Lipatov

gita add rewrite, add two arg support for add repo

parent 57a21fb3
......@@ -157,18 +157,16 @@ if [ "$1" = "add" ] ; then
TASK="$(get_last)"
ADDCMD="$2"
shift 2
else
fatal "don't support $1 $2 command"
fi
# allow package list for $ADDCMDLIST commands
if [ -n "$ADDCMD" ] ; then
PACKAGELIST=''
[ -n "$1" ] || fatal "no packages"
while [ -n "$1" ] ; do
PACKAGELIST="$PACKAGELIST $1"
PACKAGE="$1"
[ "$ADDCMD" = "repo" ] && PACKAGE="$1 $2" && shift
shift
done
[ -n "$PACKAGELIST" ] || fatal "no packages"
for PACKAGE in $PACKAGELIST ; do
ST="$(get_subtask $TASK $PACKAGE)"
if [ -n "$ST" ] ; then
info "$PACKAGE already present in the task $TASK as subtask $ST, replacing ..."
......@@ -178,7 +176,6 @@ if [ "$1" = "add" ] ; then
docmd ssh $GEARHOST task add $TASK $SUBTASK $ADDCMD $PACKAGE
done
exit
fi
fi
if [ "$1" = "show" ] ; then
......
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