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
6ea326b7
Commit
6ea326b7
authored
Apr 11, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add gacl: utility for acl control
parent
0d3c7a9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
gacl
bin/gacl
+69
-0
No files found.
bin/gacl
0 → 100755
View file @
6ea326b7
#!/bin/sh
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod git
test
-r
"
$1
"
&&
fatal
"Do not need any files in params"
if
is_girar_name
$1
;
then
GIRARHOST
=
$1
shift
fi
mygetopts
()
{
if
[
"
$1
"
=
"-h"
]
;
then
echo
"gacl - acl control for gear repo in
$GIRARHOST
"
echo
"Use: gacl [GEAR] [-
$CURRENTBRANCHNAME
] [package] command [params]"
echo
"Examples:"
echo
" gacl [-
$CURRENTBRANCHNAME
] package add newuser"
echo
" gacl [-
$CURRENTBRANCHNAME
] package del newuser"
echo
" gacl [-
$CURRENTBRANCHNAME
] package show"
exit
0
fi
# FIXME
# if two or one param only, try detect
if
[
-z
"
$3
"
]
||
[
-z
"
$2
"
]
;
then
# TODO
PROJECTNAME
=
$(
basename
`
get_root_git_dir
`
)
else
PROJECTNAME
=
$1
shift
fi
#echo PROJNAME: $PROJECTNAME
COMMAND
=
$1
shift
#echo COMMAND: $COMMAND
PARAM
=
$1
shift
}
#parse_cmd_pre_spec "$@"
parse_cmd_pre
"
$@
"
mygetopts
$LISTARGS
set_binaryrepo
$MENV
[
-n
"
$PROJECTNAME
"
]
||
fatal
"Project name is missed"
[
-n
"
$COMMAND
"
]
||
fatal
"Command is missed"
case
"
$COMMAND
"
in
"add"
|
"del"
)
[
-n
"
$PARAM
"
]
||
fatal
"Param for command is missed"
echo
"
$GIRARHOST
:
$BINARYREPO
ACL for
$PROJECTNAME
:
$COMMAND
$PARAM
..."
ssh
$GIRARHOST
acl
$BINARYREPO
$PROJECTNAME
$COMMAND
$PARAM
;;
"show"
)
echo
-n
"
$GIRARHOST
:
$BINARYREPO
ACL for "
ssh
$GIRARHOST
acl
$BINARYREPO
$PROJECTNAME
$COMMAND
;;
*
)
fatal
"Unknown command
$COMMAND
"
;;
esac
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