forked from giggio/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 4
/
post-install.sh
executable file
·57 lines (48 loc) · 1.1 KB
/
post-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
#!/usr/bin/env bash
set -euo pipefail
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ALL_ARGS=$@
UPDATE=false
SHOW_HELP=false
VERBOSE=false
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--update|-u)
UPDATE=true
shift
;;
--help|-h)
SHOW_HELP=true
break
;;
--verbose)
VERBOSE=true
shift
;;
*)
shift
;;
esac
done
if $SHOW_HELP; then
cat <<EOF
Installs everything after dotbot initial setup.
Usage:
`readlink -f $0` [flags]
Flags:
-u, --update Will download and install/reinstall even if the tools are already installed
--verbose Show verbose output
-h, --help This help
EOF
exit 0
fi
if $VERBOSE; then
echo -e "\e[32mRunning `basename "$0"` $ALL_ARGS\e[0m"
echo Update is $UPDATE
fi
sudo -E $BASEDIR/install-root-pkgs.sh $ALL_ARGS
$BASEDIR/install-user-pkgs.sh $ALL_ARGS
$BASEDIR/install-platform-tools.sh $ALL_ARGS
sudo -E $BASEDIR/configure-root-env.sh $ALL_ARGS
$BASEDIR/configure-user-env.sh $ALL_ARGS