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
a172d9d2
Commit
a172d9d2
authored
Oct 07, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitask: add acl command (in favor of gacl)
parent
f8154585
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
gitask
bin/gitask
+33
-1
No files found.
bin/gitask
View file @
a172d9d2
...
...
@@ -18,7 +18,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo
echo
"Examples:"
echo
" ls - list tasks"
echo
" new [
p8] - create new task [on p8 branch, Sisyphus by default]
"
echo
" new [
branch] - create new task on branch (Sisyphus by default)
"
echo
" run [-m <message>] [NNNN] - run task NNNN"
echo
" commit [-m <message>] [NNNN] [NNNN2] - commit task(s) NNNN, [NNNN2]"
echo
" add del package [package2] - add package remove command"
...
...
@@ -33,6 +33,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo
" show NNNN - show subtask list for task NNNN"
echo
" quota - show quota on the git server"
echo
" cancel NNNN - cancel task NNNN"
echo
" acl [branch] show PACKAGE - show acl "
echo
" acl [branch] show PACKAGE add maintainer - add acl "
echo
" rebuild --help - rebuild package"
exit
0
fi
...
...
@@ -78,6 +80,36 @@ if [ "$1" = "find" ] ; then
exit
fi
set_if_matched
()
{
local
i
local
m
=
"
$1
"
shift
for
i
in
$*
;
do
echo
"
$m
"
|
grep
"^
$i
$"
&&
return
done
echo
"Sisyphus"
return
1
}
# acl [p9] show mc | add mc lav
if
[
"
$1
"
=
"acl"
]
;
then
shift
BINARYREPO
=
$(
set_if_matched
$1
"Sisyphus [ptc][6-9] [ptc][6-9]
\.
[0-9]"
)
&&
shift
COMMAND
=
"
$1
"
PROJECTNAME
=
"
$2
"
[
-z
"
$PROJECTNAME
"
]
&&
PROJECTNAME
=
"
$COMMAND
"
&&
COMMAND
=
"show"
OPERAND
=
"
$3
"
showcmd ssh
$GEARHOST
acl
$BINARYREPO
$PROJECTNAME
$COMMAND
$OPERAND
echo
"
$GEARHOST
:
$BINARYREPO
ACL for
$PROJECTNAME
:"
if
[
"
$COMMAND
"
=
"show"
]
;
then
ssh
$GEARHOST
acl
$BINARYREPO
$PROJECTNAME
$COMMAND
|
sed
-e
"s|^
$PROJECTNAME
||"
else
ssh
$GEARHOST
acl
$BINARYREPO
$PROJECTNAME
$COMMAND
$OPERAND
fi
exit
fi
if
[
"
$1
"
=
"rebuild"
]
;
then
shift
showcmd
"
$GEARHOST
>"
build rebuild
"
$@
"
...
...
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