mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-20 15:05:08 +00:00
passing optional args nicely in getopt is a pain
This commit is contained in:
parent
6bab2b4cf7
commit
ea945b6917
1 changed files with 6 additions and 3 deletions
9
dbench
9
dbench
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue