aboutsummaryrefslogtreecommitdiff
path: root/gitwrapper.sh
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-07-20 04:13:07 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-07-20 04:13:07 +0200
commita96b78c44a139bfd3ebbb5f46f7312c92163866f (patch)
tree8141b9ab9e37b196351dcc8b6e2010506b0c455e /gitwrapper.sh
parentfe1aa6fd00d3da84276b2e0d1e9b0116c3bb23c6 (diff)
downloadreposync-a96b78c44a139bfd3ebbb5f46f7312c92163866f.tar.gz
new option -a
Diffstat (limited to 'gitwrapper.sh')
-rwxr-xr-xgitwrapper.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/gitwrapper.sh b/gitwrapper.sh
index 0ff0486..a216bd8 100755
--- a/gitwrapper.sh
+++ b/gitwrapper.sh
@@ -21,8 +21,9 @@ function usage() {
$(basename $0) [options]
Options:
- -r <DIR> Allowed directory for pull
- -w <DIR> Allowed directory for push
+ -r <DIR> Allow pull from DIR
+ -w <DIR> Allow push to DIR
+ -a <DIR> Allow push/pull from/to DIR
-i Allow inetractive Login
EOF
exit $1
@@ -67,7 +68,7 @@ unset INTERACTIVE READING WRITING
READING=()
WRITING=()
-while getopts "r:w:i" options; do
+while getopts "r:w:a:i" options; do
case "$options" in
i)
INTERACTIVE="yes";;
@@ -75,6 +76,9 @@ while getopts "r:w:i" options; do
READING+=( "$OPTARG" );;
w)
WRITING+=( "$OPTARG" );;
+ a)
+ WRITING+=( "$OPTARG" )
+ READING+=( "$OPTARG" );;
:)
perror "-$OPTARG requires argument"
usage 1;;