From a96b78c44a139bfd3ebbb5f46f7312c92163866f Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 20 Jul 2020 04:13:07 +0200 Subject: new option -a --- gitwrapper.sh | 10 +++++++--- 1 file 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 Allowed directory for pull - -w Allowed directory for push + -r Allow pull from DIR + -w Allow push to DIR + -a 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;; -- cgit v1.2.3