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