-
Notifications
You must be signed in to change notification settings - Fork 0
/
.setup
executable file
·56 lines (50 loc) · 1.74 KB
/
.setup
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
function runDots() {
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
for ARG in "$0"
do
if [ $ARG == "osxprep" ] || [ $ARG == "all" ]; then
echo ""
echo "----------------------------------------------------"
echo "Updating OSX and installing Xcode command line tools"
echo "----------------------------------------------------"
echo ""
./osx.sh
fi
if [ $ARG == "homebrew" ] || [ $ARG == "all" ]; then
echo ""
echo "------------------------------------------------------------------------------------"
echo "Installing Homebrew along with some common formulae and apps."
echo "This might take a while to complete. some formulae need to be installed from source."
echo "------------------------------------------------------------------------------------"
echo ""
./homebrew.sh
fi
if [ $ARG == "osx" ] || [ $ARG == "all" ]; then
echo ""
echo "------------------------------"
echo "Setting sensible OSX defaults."
echo "------------------------------"
echo ""
./osx.sh
fi
if [ $ARG == "dotfiles" ] || [ $ARG == "all" ]; then
echo ""
echo "--------------------"
echo "Setting up dotfiles."
echo "--------------------"
echo ""
./dotfiles.sh
fi
done
echo "-----------------------------------------------------------"
echo "Completed setup. Restart to ensure all updates take effect."
echo "-----------------------------------------------------------"
}
read -p "This script may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
runDots $@
fi;
unset runDots;