-
Notifications
You must be signed in to change notification settings - Fork 736
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·42 lines (33 loc) · 990 Bytes
/
Copy pathuninstall.sh
File metadata and controls
executable file
·42 lines (33 loc) · 990 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEPLOYMENT_COMMON="$SCRIPT_DIR/deploy/common/common.sh"
if [ -f "$DEPLOYMENT_COMMON" ]; then
# shellcheck source=/dev/null
source "$DEPLOYMENT_COMMON"
fi
[ -n "${DEPLOYMENT_LANGUAGE:-}" ] || DEPLOYMENT_LANGUAGE="en"
usage() {
if [ "$DEPLOYMENT_LANGUAGE" = "zh" ]; then
cat <<'USAGE'
用法:
bash uninstall.sh docker [Docker 卸载选项]
bash uninstall.sh k8s [K8s 卸载选项]
此根入口只转发到目标专用卸载脚本。
实现:deploy/uninstall.sh
USAGE
return
fi
cat <<'USAGE'
Usage:
bash uninstall.sh docker [docker uninstall options]
bash uninstall.sh k8s [k8s uninstall options]
This root entrypoint only forwards to the target-specific uninstall script.
Implementation: deploy/uninstall.sh
USAGE
}
if [ "${1:-}" = "--help" ] || [ "${1:-}" = "-h" ] || [ $# -eq 0 ]; then
usage
exit 0
fi
exec bash "$SCRIPT_DIR/deploy/uninstall.sh" "$@"