-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·67 lines (57 loc) · 2.01 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
# helo
echo "Hello!"
echo "This script will install some basic tools and set some configurations for you."
echo "The Dock might restart a few times. This is normal."
echo "Please enter the user password below to begin the installation."
# ask for the administrator password upfront
sudo -v;
# xcode command line tools
echo "Installing Xcode Command Line Tools..."
xcode-select --install;
# install brew
echo "Installing Homebrew...";
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)";
eval "$(/opt/homebrew/bin/brew shellenv)"
# Set zshrc
echo "Setting zshrc..."
cp ./zshrc ~/.zshrc;
source ~/.zshrc;
# Google Cloud SDK
echo "Installing Google Cloud SDK..."
brew install --cask google-cloud-sdk;
echo "
# gcloud
source \"$(brew --prefix)/share/google-cloud-sdk/path.zsh.inc\"
source \"$(brew --prefix)/share/google-cloud-sdk/completion.zsh.inc\"
" >> ~/.zshrc;
# Ruby/Rails
echo "Installing Ruby and Rails..."
brew install ruby;
source ~/.zshrc;
gem install rails;
# Node.js
echo "Installing Node.js..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.zshrc;
nvm install node --lts;
# Clear dock
defaults write com.apple.dock persistent-apps -array;
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/System/Applications/Mail.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}'
killall Dock;
# Set wallpaper
echo "Setting wallpaper..."
cp ./bg.png ~/Pictures/bg.png;
osascript <<EOD
tell application "System Events"
set desktopCount to count of desktops
repeat with desktopNumber from 1 to desktopCount
tell desktop desktopNumber
set picture to "~/Pictures/bg.png"
end tell
end repeat
end tell
EOD
killall Dock;
# Done
echo "Done! Feel free to erase this folder.";