-
Notifications
You must be signed in to change notification settings - Fork 3
/
Install.sh
84 lines (60 loc) · 1.76 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Die on failures
set -e
# Load global system
source ~/.setup/System/Global.sh
# Load profile paths
load System/Profile/Scripts/Paths.sh
# Install Homebrew
load System/Install/Homebrew.sh
# Install Bottles
load System/Install/Bottles.sh
# Install Apps
load System/Install/Apps.sh
# Install Powify
load System/Install/Powify.sh
# Configure Vagrant
load System/Install/Vagrant.sh
# Configure Preferences
load System/Install/Preferences.sh
# Configure Gitfiles
load System/Install/Gitfiles.sh
# Install Composer Packages
load System/Install/Packages.sh
# Install Node Packages
load System/Install/Node.sh
# Install Valet
load System/Install/Valet.sh
# Install Homestead
load System/Install/Homestead.sh
# Install Scripts
load System/Install/Scripts.sh
# Install Pip Packages
load System/Install/Pips.sh
# Set permisions for Homebrew folder
sudo chown -R $(whoami) $(brew --prefix)/*
# Add required folder for running mongod.
#sudo mkdir -p /data/db
#sudo chown -R $(whoami) /data/db
# Ensure profile exists
touch ~/.bash_profile
if [[ $WRITE_TO_PROFILE == true ]]; then
# Add Profile.sh to .bash_profile
if grep -q "source ~/.setup/System/Profile.sh" ~/.bash_profile; then
echo "Profile already loading in ~/.bash_profile"
else
echo '\n\n#Load .setup profile\nsource ~/.setup/System/Profile.sh\n\n' >> ~/.bash_profile
fi
# Add Profile.sh to .zshrc
if grep -q "source ~/.setup/System/Profile.sh" ~/.zshrc; then
echo "Profile already loading in ~/.zshrc"
else
echo "\n\n#Load .setup profile\nsource ~/.setup/System/Profile.sh\n\n" >> ~/.zshrc
fi
fi
print_success "Installation complete!"
# Do not die on failures
set +e
# Set variable to let scripts know that install have just been completed
INSTALL_COMPLETE=true
# Load profile
source ~/.bash_profile