-
Notifications
You must be signed in to change notification settings - Fork 0
/
sm
executable file
·45 lines (32 loc) · 940 Bytes
/
sm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# TODO: check why "set -e" does not work.
set -o errexit -o nounset -o pipefail
PROGRAM_NAME="Slime Mold"
PROGRAM_SHORT_NAME="sm"
SCRIPT_PATH="$(dirname "${0}")"
SM_SUB_PATH="slime-mold"
SM_CONFIG_PATH="${HOME}/.config/${SM_SUB_PATH}"
SM_CACHE_PATH="${HOME}/.cache/${SM_SUB_PATH}"
BIVALVIA_PATH="${SCRIPT_PATH}/vendor/libbivalvia/bivalvia"
source "${BIVALVIA_PATH}/debug.sh"
INCLUDE_PATH="${SCRIPT_PATH}/sh_inc"
source "${INCLUDE_PATH}/appliance.sh"
source "${INCLUDE_PATH}/check.sh"
source "${INCLUDE_PATH}/lock.sh"
source "${INCLUDE_PATH}/parse_cmd.sh"
source "${INCLUDE_PATH}/qemu.sh"
source "${INCLUDE_PATH}/shortcut.sh"
source "${INCLUDE_PATH}/spice.sh"
source "${INCLUDE_PATH}/ssh.sh"
source "${INCLUDE_PATH}/switch.sh"
source "${INCLUDE_PATH}/vm.sh"
# stack_trace
trap stack_trace ERR
ERR=0
if [ "${?}" != "0" ]; then
ERR=1
echo "exit status: ${?}"
fi
check_all_dependencies
parse_cmd $*
exit ${ERR}