-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
41 lines (32 loc) · 843 Bytes
/
setup.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
#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE}")";
# SPECIFY $PATH
export PATH="/usr/local/bin:$PATH"
git pull origin master;
function setupHome() {
rsync --exclude ".DS_Store" \
--exclude "README.md" \
--exclude "*.sh" \
--exclude "*.terminal" \
--exclude ".git/" \
-avh --no-perms . ~;
source ~/.bash_profile;
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
setupHome;
else
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
setupHome;
fi;
fi;
unset setupHome;
# EXECUTE SCRIPTS
sh scripts/brew.sh
sh scripts/config.sh
sh scripts/defaults.sh
# SET DEFAULT SHELL TO BASH
chsh -s /bin/bash
# CLOSING MESSAGE
echo "THE SCRIPT INSTALLATION HAS BEEN COMPLETED. PLEASE RESTART YOUR TERMINAL TO SEE THE CHANGES";