generated from nucleus-labs/goose.template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdhelper
executable file
·46 lines (33 loc) · 871 Bytes
/
dhelper
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
#!/usr/bin/env bash
[[ ! -f "arg_parse.bash" ]] && {
echo "arg_parse.bash is missing! Critical dependency! Exiting..." >&2
exit 255
}
source arg_parse.bash
[[ ! -d "targets/" ]] && {
echo "no target directory! Nothing to run! Exiting..." >&2
exit 255
}
[[ ! -f "targets/common.bash" ]] && {
echo "Missing common target! Critical dependency! Exiting..." >&2
exit 255
}
source targets/common.bash
function init () {
[[ ! -f .env ]] && echo -e "\n\n\n" > .env
source .env
}
function cleanup () {
return
}
# ================================================================================================
# MAIN
function main () {
init
validate_flags
execute_flags
[[ ${IGNORE_DEPENDENCIES} -eq 0 ]] && validate_dependencies
validate_target
cleanup
}
main