-
Notifications
You must be signed in to change notification settings - Fork 0
/
installscript
147 lines (114 loc) · 3.66 KB
/
installscript
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/bin/bash
# Change dir to HOME
cd $HOME
# Hide "last login" line when starting a new terminal session
touch $HOME/.hushlogin
if [ "$(uname -m)" = "arm64" ]; then
echo ''
echo 'Install rosetta'
echo '----------------'
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
sudo mkdir /usr/local/bin
fi
echo ''
echo 'Install homebrew'
echo '----------------'
sudo rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# homebrew-cask-upgrade
# brew cu shows all cask with their status
# brew cu --all Force upgrade outdated apps
brew tap buo/cask-upgrade
brew update
if [[ "$ENABLE_INSTALL_CLI" == "true" ]]; then
source $HOME/.dotfiles/install/cli.sh
fi
if [[ "$ENABLE_INSTALL_GIT" == "true" ]]; then
source $HOME/.dotfiles/install/git.sh
fi
if [[ "$ENABLE_INSTALL_SVN" == "true" ]]; then
source $HOME/.dotfiles/install/svn.sh
fi
if [[ "$ENABLE_INSTALL_SHELL" == "true" ]]; then
source $HOME/.dotfiles/install/shell.sh
fi
if [[ "$ENABLE_INSTALL_VIM" == "true" ]]; then
source $HOME/.dotfiles/install/vim.sh
fi
if [[ "$ENABLE_INSTALL_GO" == "true" ]]; then
source $HOME/.dotfiles/install/go.sh
fi
if [[ "$ENABLE_INSTALL_RUST" == "true" ]]; then
source $HOME/.dotfiles/install/rust.sh
fi
if [[ "$ENABLE_INSTALL_PHP" == "true" ]]; then
source $HOME/.dotfiles/install/php.sh
fi
if [[ "$ENABLE_INSTALL_NODE" == "true" ]]; then
source $HOME/.dotfiles/install/node.sh
fi
if [[ "$ENABLE_INSTALL_VIRTUALISATION" == "true" ]]; then
source $HOME/.dotfiles/install/gui.sh
fi
if [[ "$ENABLE_INSTALL_CONTAINER" == "true" ]]; then
source $HOME/.dotfiles/install/container.sh
fi
if [[ "$ENABLE_INSTALL_CLOUD" == "true" ]]; then
source $HOME/.dotfiles/install/cloud.sh
fi
if [[ "$ENABLE_INSTALL_KUBERNETES" == "true" ]]; then
source $HOME/.dotfiles/install/kubernetes.sh
fi
if [[ "$ENABLE_INSTALL_GUI" == "true" ]]; then
source $HOME/.dotfiles/install/gui.sh
fi
if [[ "$ENABLE_INSTALL_DATABASE" == "true" ]]; then
source $HOME/.dotfiles/install/database.sh
fi
if [[ "$ENABLE_INSTALL_MEDIA" == "true" ]]; then
source $HOME/.dotfiles/install/media.sh
fi
if [[ "$ENABLE_INSTALL_BROWSER" == "true" ]]; then
source $HOME/.dotfiles/install/browser.sh
fi
if [[ "$ENABLE_INSTALL_MESSENGER" == "true" ]]; then
source $HOME/.dotfiles/install/messenger.sh
fi
if [[ "$ENABLE_INSTALL_EDITOR" == "true" ]]; then
source $HOME/.dotfiles/install/editor.sh
fi
if [[ "$ENABLE_INSTALL_MAS" == "true" ]]; then
source $HOME/.dotfiles/install/mas.sh
fi
if [[ "$ENABLE_INSTALL_QUICKLOOk" == "true" ]]; then
source $HOME/.dotfiles/install/quicklook.sh
fi
if [[ "$ENABLE_INSTALL_FONT" == "true" ]]; then
source $HOME/.dotfiles/install/font.sh
fi
if [[ "$ENABLE_INSTALL_MACKUP" == "true" ]]; then
echo ''
echo 'Install Mackup'
echo '--------------'
brew install mackup
rm $HOME/.mackup.cfg
ln -s $HOME/.dotfiles/macos/mackup.cfg $HOME/.mackup.cfg
if [ -d "$HOME/Dropbox/Mackup/" ]; then
mackup restore --force
fi
fi
echo ''
echo ''
echo '+++++++++++++++++++++++++++++++'
echo '+ All done! +'
echo '+++++++++++++++++++++++++++++++'
echo ''
echo ''
echo 'Some optional tidbits'
chmod +x $HOME/.dotfiles/macos/set-defaults.sh
chmod +x $HOME/.dotfiles/macos/unset-defaults.sh
echo '1. Set some sensible macos defaults by running: $HOME/.dotfiles/macos/set-defaults.sh'
echo '2. Make a .dotfiles-custom/shell/.aliases for your custom commands'
echo '3. Download themes from nordtheme.com for matching styling'
echo '+++++++++++++++++++++++++++++++'
echo '+++++++++++++++++++++++++++++++'