-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
install.sh
executable file
·61 lines (51 loc) · 1.16 KB
/
install.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
58
59
60
61
#!/usr/bin/env bash
set -ue
function helpmsg() {
print_default "Usage: ${BASH_SOURCE[0]:-$0} [--gui] [--arch] [--all] [--help | -h]" 0>&2
print_default ' --all: --gui + --arch'
print_default ""
}
function main() {
local current_dir
current_dir=$(dirname "${BASH_SOURCE[0]:-$0}")
source "${current_dir}"/install_scripts/lib/dotsinstaller/utilfuncs.sh
local gui="false"
local arch="false"
while [ $# -gt 0 ]; do
case ${1} in
--debug | -d)
set -uex
;;
--help | -h)
helpmsg
exit 1
;;
--gui)
gui="true"
;;
--arch)
arch="true"
;;
--all)
gui="true"
arch="true"
;;
*) ;;
esac
shift
done
if [[ "$gui" = true ]]; then
"${current_dir}"/install_scripts/dotsinstaller.sh install --with-gui
else
"${current_dir}"/install_scripts/dotsinstaller.sh install
fi
if [[ "$arch" = true ]]; then
"${current_dir}"/install_scripts/arch-extra-setup.sh --all
fi
print_info ""
print_info "#####################################################"
print_info "$(basename "${BASH_SOURCE[0]:-$0}") install finish!!!"
print_info "#####################################################"
print_info ""
}
main "$@"