blob: 0099d013b1d51a35527a137c60dc121baf68bfef [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"
Luigi Santivetti27bd2502020-11-06 14:10:07 +000011 export MANIFEST_F="MANIFEST.giggi.me"
Luigi Santivetticd666922020-10-13 23:04:31 +000012 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
40fi