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" |
Luigi Santivetti | 27bd250 | 2020-11-06 14:10:07 +0000 | [diff] [blame] | 11 | export MANIFEST_F="MANIFEST.giggi.me" |
Luigi Santivetti | cd66692 | 2020-10-13 23:04:31 +0000 | [diff] [blame] | 12 | set +x |
| 13 | |
| 14 | case "$1" in |
| 15 | cli-compose ) shift |
| 16 | pushd $INSTANCE_DIR >/dev/null |
| 17 | ./compose-cli.sh ${@} |
| 18 | popd >/dev/null |
| 19 | ;; |
| 20 | |
| 21 | cli-dc ) shift |
| 22 | pushd $INSTANCE_DIR >/dev/null |
| 23 | source $PASSWD_F |
| 24 | sudo -E docker-compose ${@} |
| 25 | popd >/dev/null |
| 26 | ;; |
| 27 | |
| 28 | tod ) shift |
| 29 | ./tod ${@} |
| 30 | ;; |
| 31 | |
| 32 | cli-gerrit ) shift |
| 33 | $INSTANCE_DIR/docker/gerrit/gerrit-cli.sh ${@} |
| 34 | ;; |
| 35 | |
| 36 | cli-mysql ) shift |
| 37 | $INSTANCE_DIR/docker/mysql/mysql-cli.sh ${@} |
| 38 | ;; |
| 39 | esac |
| 40 | fi |