summaryrefslogtreecommitdiffstats
path: root/bin/launch
blob: d24acf599f883bec19c59708de969e0d1a02835b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
set -eu
set -o pipefail

script_path="$(realpath "$(dirname "$0")")"
secrets_bin="${script_path}/secrets"

case "$1" in
base | algo | mail | partofme)
    "$secrets_bin" open
    trap '"$secrets_bin" close' EXIT
    "$(dirname "$0")/helpers/launch-$1"
    ;;
*)
    echo "unknown host $1" >&2
    exit 1
    ;;
esac