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
eb95ad9a
Commit
eb95ad9a
authored
May 08, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitask: add support from <branch> for add copy
parent
1c481218
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
gitask
bin/gitask
+15
-2
No files found.
bin/gitask
View file @
eb95ad9a
...
@@ -25,6 +25,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
...
@@ -25,6 +25,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo
" add [NNNN] (repo|build) <gear repo>.git=<gear tag> ... - add package build from repo command"
echo
" add [NNNN] (repo|build) <gear repo>.git=<gear tag> ... - add package build from repo command"
echo
" add [NNNN] del package [package2...] - add package remove command"
echo
" add [NNNN] del package [package2...] - add package remove command"
echo
" add [NNNN] rebuild package [package2...] - add package rebuild"
echo
" add [NNNN] rebuild package [package2...] - add package rebuild"
echo
" add [NNNN] copy NNNN [from XX] - copy package [from (p9|p10|Sisyphus)]"
echo
" add --help - show task add help"
echo
" add --help - show task add help"
echo
" Add <args> - add and run the task"
echo
" Add <args> - add and run the task"
echo
" task --help - show task help"
echo
" task --help - show task help"
...
@@ -80,6 +81,15 @@ _list_git_package()
...
@@ -80,6 +81,15 @@ _list_git_package()
done
done
}
}
get_last_from
()
{
local
FROMSTR
=
''
while
[
-n
"
$1
"
]
;
do
[
"
$1
"
=
"from"
]
&&
FROMSTR
=
"
$2
"
&&
break
shift
done
echo
"
$FROMSTR
"
}
NEXTCOMMAND
=
''
NEXTCOMMAND
=
''
...
@@ -280,7 +290,10 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then
...
@@ -280,7 +290,10 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then
OADDCMD
=
$ADDCMD
OADDCMD
=
$ADDCMD
[
"
$ADDCMD
"
=
"copy"
]
&&
FROMSTR
=
"
$(
get_last_from
"
$@
"
)
"
while
[
-n
"
$1
"
]
;
do
while
[
-n
"
$1
"
]
;
do
[
"
$1
"
=
"from"
]
&&
[
"
$ADDCMD
"
=
"copy"
]
&&
break
PACKAGE
=
"
$1
"
PACKAGE
=
"
$1
"
if
[
"
$OADDCMD
"
=
"repo"
]
;
then
if
[
"
$OADDCMD
"
=
"repo"
]
;
then
#<gear repo>.git=<gear tag>
#<gear repo>.git=<gear tag>
...
@@ -299,7 +312,7 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then
...
@@ -299,7 +312,7 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then
# too much re add to the same place
# too much re add to the same place
[
"
$SUBTASK
"
=
"1"
]
&&
SUBTASK
=
""
[
"
$SUBTASK
"
=
"1"
]
&&
SUBTASK
=
""
fi
fi
docmd ssh
$GEARHOST
task add
$TASK
$SUBTASK
$ADDCMD
$PACKAGE
||
fatal
docmd ssh
$GEARHOST
task add
$TASK
$SUBTASK
$ADDCMD
$PACKAGE
$FROMSTR
||
fatal
done
done
if
[
-n
"
$NEXTCOMMAND
"
]
;
then
if
[
-n
"
$NEXTCOMMAND
"
]
;
then
sleep
2
sleep
2
...
@@ -312,7 +325,7 @@ fi
...
@@ -312,7 +325,7 @@ fi
if
[
"
$1
"
=
"show"
]
;
then
if
[
"
$1
"
=
"show"
]
;
then
shift
shift
COMMIT
=
''
COMMIT
=
''
TASK
=
"
$(
get_task_number
$1
)
"
TASK
=
"
$(
get_task_number
"
$1
"
)
"
if
[
-z
"
$TASK
"
]
;
then
if
[
-z
"
$TASK
"
]
;
then
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
fi
fi
...
...
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