-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
76 lines (58 loc) · 1.89 KB
/
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
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
#echo "Creating an SSH key for you..."
#ssh-keygen -t rsa
#echo "Please add this public key to Github"
#echo "https://github.com/account/ssh"
#read -p "Press [Enter] key after this..."
if ! command -v brew &> /dev/null; then
echo -e "\n\nInstalling homebrew"
echo "=============================="
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~HOME/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
if ! command -v brew &> /dev/null; then
echo "Installing homebrew failed, exiting script..."
exit 1
fi
echo -e "\n\nUpdating homebrew"
echo "=============================="
brew update
if command -v git &> /dev/null; then
echo -e "\n\nInstalling git"
echo "=============================="
brew install git
fi
if [ ! -d $HOME/.dotfiles ]; then
echo -e "\n\nCloning .dotfiles into ~/.dotfiles"
echo "=============================="
#requires ssh git clone [email protected]:Crustan/dotfiles.git ~/.dotfiles
git clone https://github.com/Crustan/dotfiles.git ~/.dotfiles
fi
cd ~/.dotfiles
echo -e "\n\nSetting up symlinks..."
echo "=============================="
source setup/link.sh
echo -e "\n\nInstall Homebrew bundle..."
echo "=============================="
brew bundle
echo -e "\n\nSetting up Mac OS..."
echo "=============================="
source setup/macos.sh
echo -e "\n\nFixing app icons..."
echo "=============================="
source setup/icons.sh
cd ~
# Reload zsh
source ~/.zshrc
echo -e "\n\nInstalling Node..."
echo "=============================="
nvm install node
# Reload zsh
source ~/.zshrc
# echo -e "\n\nRestoring mackup backup..."
# echo "=============================="
# mackup restore
echo -e "\n\nInstalling global NPM packages..."
echo "=============================="
npm install -g trash-cli depcheck
echo "\n\nDone! Reload terminal"