mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-22 07:45:09 +00:00
fixed a few issues and did some refractoring
This commit is contained in:
parent
defe87b154
commit
2a34b296ab
1 changed files with 14 additions and 11 deletions
25
dbench
25
dbench
|
|
@ -29,6 +29,9 @@ elif [[ "$1" == 'setup' ]]; then
|
||||||
a=$(echo "$a" | tr -d / )
|
a=$(echo "$a" | tr -d / )
|
||||||
result="127.0.0.1 ${a}"
|
result="127.0.0.1 ${a}"
|
||||||
run root "echo ${result} | tee --append /etc/hosts"
|
run root "echo ${result} | tee --append /etc/hosts"
|
||||||
|
else
|
||||||
|
IFS=" "
|
||||||
|
run frappe "bench $*"
|
||||||
fi
|
fi
|
||||||
elif [[ "$1" == '-c' ]]; then
|
elif [[ "$1" == '-c' ]]; then
|
||||||
shift
|
shift
|
||||||
|
|
@ -36,22 +39,22 @@ elif [[ "$1" == '-c' ]]; then
|
||||||
shift
|
shift
|
||||||
run "$user" "$@"
|
run "$user" "$@"
|
||||||
elif [[ "$1" == '-h' ]]; then
|
elif [[ "$1" == '-h' ]]; then
|
||||||
echo "$0 [-h] | [ -c frappe | root <command to run> ] [ <command to send to bench> ]"
|
echo "$0 [-h] | [-c frappe|root command] | [setup hosts|docker [stop|down]] | [bench_command]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "$0 extends the Frappe Bench tool, and is used like it. However, it extends the tool in a few places."
|
echo "$0 is a wrapper for the Frappe Bench tool, and is used like it. However, it extends the tool in a few places."
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo " $0"
|
|
||||||
echo " Launches you into an interactive shell in the container as user frappe"
|
|
||||||
echo " $0 setup docker [ stop | down ]"
|
|
||||||
echo " Starts and builds the docker containers using \"docker-compose up -d\""
|
|
||||||
echo " $0 setup hosts"
|
|
||||||
echo " Adds all sites to the containers hosts file"
|
|
||||||
echo " $0 -c frappe | root <command to run>"
|
|
||||||
echo " Runs a command in the container, as the selected user"
|
|
||||||
echo " $0 -h"
|
echo " $0 -h"
|
||||||
echo " Shows this help message"
|
echo " Shows this help message"
|
||||||
|
echo " $0"
|
||||||
|
echo " Launches you into an interactive shell in the container as user frappe"
|
||||||
echo " $0 <command to send to bench>"
|
echo " $0 <command to send to bench>"
|
||||||
echo " Runs a command in bench, i.e. $0 new-site site1.local = bench new-site site1.local"
|
echo " Runs the bench command <command>, i.e. $0 new-site \"site1.local\" = bench new-site \"site1.local\""
|
||||||
|
echo " $0 setup docker [ stop | down ]"
|
||||||
|
echo " Builds and starts the docker containers using \"docker-compose up -d\""
|
||||||
|
echo " $0 setup hosts"
|
||||||
|
echo " Adds all site names to the containers hosts file"
|
||||||
|
echo " $0 -c frappe | root <command to run>"
|
||||||
|
echo " Runs a command in the container, as the selected user"
|
||||||
else
|
else
|
||||||
IFS=" "
|
IFS=" "
|
||||||
run frappe "bench $*"
|
run frappe "bench $*"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue