Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
cb2e3e90
Commit
cb2e3e90
authored
May 25, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitask: add cancel support
parent
2566cf20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
gitask
bin/gitask
+14
-2
No files found.
bin/gitask
View file @
cb2e3e90
...
...
@@ -14,10 +14,15 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo
"Use: gitask [GIRAR] [task|show|ls|quota]"
echo
"
$HELP_GIRAR
"
echo
" --help - help"
docmd ssh
$GEARHOST
task
help
docmd ssh
$GEARHOST
task
help
|
sed
-e
"s|abort|cancel|g"
exit
0
fi
get_last
()
{
ssh
$GEARHOST
task
ls
|
head
-n1
|
sed
-e
"s|^#
\(
[0-9]*
\)
.*|
\1
|g"
||
fatal
}
# TODO: acl
epm assure girar-show girar-utils
...
...
@@ -31,7 +36,7 @@ if [ "$1" = "get" ] ; then
echo
"
$SUBTASK
"
exit
elif
[
"
$1
$2
$3
"
=
"get last "
]
||
[
"
$1
$2
$3
"
=
"get last task"
]
;
then
TASK
=
"
$(
ssh
$GEARHOST
task
ls
|
head
-n1
|
sed
-e
"s|^#
\(
[0-9]*
\)
.*|
\1
|g"
)
"
||
fatal
TASK
=
"
$(
get_last
)
"
||
fatal
echo
"
$TASK
"
exit
else
...
...
@@ -72,6 +77,13 @@ if [ "$1" = "quota" ] ; then
exit
fi
if
[
"
$1
"
=
"cancel"
]
;
then
shift
#TASK="$(get_last)" || fatal
docmd ssh
$GEARHOST
task abort
"
$@
"
exit
fi
if
[
"
$1
"
=
"task"
]
;
then
# by default
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment