blob: 5758bb8f640933369a3e81ca44d4e953a343e3d4 [file] [log] [blame]
Luigi Santivetticd666922020-10-13 23:04:31 +00001#!/bin/bash
2
3if (return 0 2>/dev/null); then
4 echo "Do not source, instead run ${BASH_SOURCE[0]}" >&2
5else
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
39fi