-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·71 lines (57 loc) · 1.51 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/opt/homebrew/bin/zsh
LGRN='\033[1;32m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
clog() {
echo "${CYAN}>>>>> $1 <<<<<${NC}"
}
plog() {
echo "${LGRN}>>>>> $1 <<<<<${NC}"
}
if grep -q "export PATH" ~/.zshrc
then
clog "Found \"export PATH\" in ~/.zshrc, skipping update"
clog "Existing PATH:"
echo $PATH
else
clog "Updating PATH..."
echo "export PATH=\"/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin:\$PATH\"" >> ~/.zshrc
exec zsh
clog "Updated PATH:"
echo $PATH
fi
echo ""
clog "Creating ~/Applications for personal applications..."
mkdir -p ~/Applications
if grep -q "HOMEBREW_CASK_OPTS" ~/.zshrc
then
clog "Found HOMEBREW_CASK_OPTS in ~/.zshrc, skipping update"
else
clog "Updating homebrew cask install directory to ~/Applications..."
echo "export HOMEBREW_CASK_OPTS=\"--appdir=~/Applications\"" >> ~/.zshrc
exec zsh
fi
echo ""
clog "Installing latest node..."
source ~/.nvm/nvm.sh
nvm install --lts
plog Done!
echo ""
clog "Updating global npm config..."
./npm/global-config
plog Done!
clog "Installing global npm packages..."
./npm/global-packages
plog Done!
clog "Installing prerequisites for brew casks"
sudo softwareupdate --install-rosetta
clog "Installing brew packages and casks..."
brew doctor
brew update
brew bundle --file brew/Brewfile
clog "Symlinking Sublime to subl..."
sudo ln -sf ~/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
plog Done!
clog "Updating VLC settings..."
./applications/vlc/sync import
plog Done!