Commit efcdf6ce authored by Vitaly Lipatov's avatar Vitaly Lipatov

gitask: improve --help support

parent 3f01a11e
...@@ -87,10 +87,6 @@ if [ "$1" = "get" ] ; then ...@@ -87,10 +87,6 @@ if [ "$1" = "get" ] ; then
fi fi
eval lastarg=\${$#} eval lastarg=\${$#}
if [ "$lastarg" = "--help" ] ; then
docmd ssh $GEARHOST "$@"
exit
fi
if [ "$1" = "find" ] ; then if [ "$1" = "find" ] ; then
shift shift
...@@ -113,6 +109,10 @@ set_if_matched() ...@@ -113,6 +109,10 @@ set_if_matched()
# acl [p9] show mc | add mc lav # acl [p9] show mc | add mc lav
if [ "$1" = "acl" ] ; then if [ "$1" = "acl" ] ; then
if [ "$lastarg" = "--help" ] ; then
docmd ssh $GEARHOST "$@"
exit
fi
shift shift
BINARYREPO=$(set_if_matched $1 "Sisyphus [ptc][6-9] [ptc][6-9]\.[0-9]") && shift BINARYREPO=$(set_if_matched $1 "Sisyphus [ptc][6-9] [ptc][6-9]\.[0-9]") && shift
COMMAND="$1" COMMAND="$1"
...@@ -145,6 +145,24 @@ if [ "$1" = "log" ] ; then ...@@ -145,6 +145,24 @@ if [ "$1" = "log" ] ; then
exit exit
fi fi
if [ "$1" = "quota" ] ; then
docmd ssh $GIRARHOST quota "$@"
exit
fi
if [ "$1 $2" = "cancel --help" ] ; then
echo "cancel a task"
echo "Usage: $ gita cancel <task id>"
exit
fi
if [ "$lastarg" = "--help" ] ; then
docmd ssh $GEARHOST task "$@"
exit
fi
# task command below
if [ "$1" = "ls" ] ; then if [ "$1" = "ls" ] ; then
shift shift
if [ "$1" = "--all" ] || [ "$1" = "-a" ] ; then if [ "$1" = "--all" ] || [ "$1" = "-a" ] ; then
...@@ -158,11 +176,6 @@ if [ "$1" = "ls" ] ; then ...@@ -158,11 +176,6 @@ if [ "$1" = "ls" ] ; then
exit exit
fi fi
if [ "$1" = "quota" ] ; then
docmd ssh $GIRARHOST quota
exit
fi
if [ "$1" = "delsub" ] ; then if [ "$1" = "delsub" ] ; then
shift shift
TASK="$(get_task_number $1)" TASK="$(get_task_number $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