passing optional args nicely in getopt is a pain

This commit is contained in:
chabad360 2018-08-02 17:47:25 -07:00
parent 6bab2b4cf7
commit ea945b6917

9
dbench
View file

@ -60,11 +60,11 @@ while true; do
-d | --developer) -d | --developer)
shift; # The arg is next in position args shift; # The arg is next in position args
dev=1 dev=1
site="$optopt" site="$1"
;; ;;
-c) -c)
shift shift
docker exec -it frappe bash -c "bench $optarg" docker exec -it frappe bash -c "bench $*"
;; ;;
-u) -u)
d=1 d=1
@ -80,7 +80,6 @@ while true; do
;; ;;
--init) --init)
init=1 init=1
site="$optarg"
;; ;;
--start) --start)
start=1 start=1
@ -92,6 +91,10 @@ while true; do
shift shift
done done
if [ $site == "" ]; then
site=$1
fi
if [ $setup == 1 ]; then if [ $setup == 1 ]; then
docker-compose build docker-compose build
if [ $d == 1 ]; then if [ $d == 1 ]; then