Luigi Santivetti | cd66692 | 2020-10-13 23:04:31 +0000 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | if (return 0 2>/dev/null); then |
| 4 | echo "Do not source, instead run ${BASH_SOURCE[0]}" >&2 |
| 5 | else |
| 6 | set -x |
| 7 | export INSTANCE_MODE="release" |
| 8 | export HOST_NAME="giggi.me" |
| 9 | export INSTANCE_DIR="/home/luigi/$HOST_NAME" |
| 10 | export PASSWD_F="/home/luigi/tod/PASSWD" |
| 11 | set +x |
| 12 | |
| 13 | case "$1" in |
| 14 | cli-compose ) shift |
| 15 | pushd $INSTANCE_DIR >/dev/null |
| 16 | ./compose-cli.sh ${@} |
| 17 | popd >/dev/null |
| 18 | ;; |
| 19 | |
| 20 | cli-dc ) shift |
| 21 | pushd $INSTANCE_DIR >/dev/null |
| 22 | source $PASSWD_F |
| 23 | sudo -E docker-compose ${@} |
| 24 | popd >/dev/null |
| 25 | ;; |
| 26 | |
| 27 | tod ) shift |
| 28 | ./tod ${@} |
| 29 | ;; |
| 30 | |
| 31 | cli-gerrit ) shift |
| 32 | $INSTANCE_DIR/docker/gerrit/gerrit-cli.sh ${@} |
| 33 | ;; |
| 34 | |
| 35 | cli-mysql ) shift |
| 36 | $INSTANCE_DIR/docker/mysql/mysql-cli.sh ${@} |
| 37 | ;; |
| 38 | esac |
| 39 | fi |