-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.sh
executable file
·57 lines (52 loc) · 1.38 KB
/
dev.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
script_dir="$(
cd "$(dirname "$0")"
pwd -P
)"
cd "$script_dir"
if [ ! -f shellutil/shellutil.sh ]; then
git submodule update --init
fi
# shellcheck source=shellutil/mainutil.sh
. shellutil/mainutil.sh
# shellcheck source=shellutil/shellutil.sh
. shellutil/shellutil.sh
# set -o xtrace
format() {
shellutil/format.sh docker-shell-format dev.sh
certbot-dns-route53-renew-cron/dev.sh docker-format
mariadb-aws_key_management-plugin-build/dev.sh docker-format
openresty-non-root/dev.sh docker-format
node-no-yarn/dev.sh docker-format
shellutil-dev/dev.sh docker-format
}
main() {
local command_help
command_help='docker-format - Format shell scripts and Markdown files.
git - Run git.
update - Run update in each subproject.'
local commands
commands="$(main_extract_commands "$command_help")"
# shellcheck disable=SC2086
if [ -z "${1:-}" ]; then
main_exit_with_no_command_error "$command_help"
elif [ "$1" = "$(arg 0 $commands)" ]; then
format
elif [ "$1" = "$(arg 1 $commands)" ]; then
shift
shellutil/git.sh git "$@"
elif [ "$1" = "$(arg 2 $commands)" ]; then
update
else
main_exit_with_invalid_command_error "$1" "$command_help"
fi
}
update() {
set -o xtrace
certbot-dns-route53-renew-cron/dev.sh update
mariadb-aws_key_management-plugin-build/dev.sh update
node-no-yarn/dev.sh update
openresty-non-root/dev.sh update
shellutil-dev/dev.sh docker-update
}
main "$@"