-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·65 lines (47 loc) · 1.34 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
62
63
64
65
#!/bin/bash
sudo --validate # refresh sudo timeout
# Ensure the script is always ran from the same location
ABS_PATH=~/.autoconfig
if ! cd "$ABS_PATH"; then
echo "Expected installation location: $ABS_PATH"
exit 1
fi
git submodule update --init
git pull --rebase
SOURCE="$(pwd)/config"
skiplist=()
for skiptest in $(find "$SOURCE" -name 'skip-condition.*'); do
if ! "$skiptest"; then
skiplist+=($(dirname "$skiptest"))
fi
done
findargs=()
if [[ -n "${skiplist[@]}" ]]; then
findargs+=(-type d \()
echo "Blacklisted the following directories:"
for skipdir in "${skiplist[@]}"; do
echo " * ${skipdir}"
findargs+=(-path "${skipdir}" -o)
done
echo
# remove last '-o'
unset 'findargs[${#findargs[@]}-1]'
findargs+=(\) -prune -o)
fi
echo "Installing prerequisites........."
source ./install-scripts/prereqs.sh
echo ".............................done"
echo ""
echo "Running configuration............"
source ./install-scripts/configs.sh
echo ".............................done"
echo ""
echo "Installing symlinks.............."
source ./install-scripts/symlinks.sh
echo ".............................done"
echo ""
echo "Installing bins.................."
source ./install-scripts/bins.sh
echo ".............................done"
echo ""
echo "All done! You should probably reboot now."