case can be really annoying

This commit is contained in:
chabad360 2018-08-02 18:19:55 -07:00
parent c5daea64ad
commit 56cf9f546c

11
dbench
View file

@ -33,7 +33,7 @@ function frappe_installer {
add=0 add=0
setup=0 setup=0
d=0 up=0
start=0 start=0
init=0 init=0
dev=0 dev=0
@ -63,7 +63,7 @@ key="$1"
cmd=1 cmd=1
;; ;;
-u) -u)
d=1 up=1
;; ;;
-m) -m)
mgr=1 mgr=1
@ -86,12 +86,13 @@ key="$1"
esac esac
shift shift
done done
set -- "${POSITIONAL[@]}" set -- "${positional[@]}"
site="$1" site="$1"
if [ $setup == 1 ]; then if [ $setup == 1 ]; then
docker-compose build docker-compose build
if [ $d == 1 ]; then if [ $up == 1 ]; then
docker-compose up -d docker-compose up -d
else else
docker-compose up docker-compose up
@ -116,7 +117,7 @@ if [ $init == 1 ]; then
echo "finished" echo "finished"
fi fi
if [ $d == 1 ]; then if [ $dev == 1 ]; then
docker exec -it -u root frappe bash -c "bench --site $site set-config \"developer_mode\" 1 && bench clear-cache" docker exec -it -u root frappe bash -c "bench --site $site set-config \"developer_mode\" 1 && bench clear-cache"
fi fi
exit 0 exit 0