-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdigiarch-software-script
More file actions
executable file
Β·248 lines (194 loc) Β· 5.65 KB
/
digiarch-software-script
File metadata and controls
executable file
Β·248 lines (194 loc) Β· 5.65 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# A script for basic software installations for NYPL's Digital Archives department.
echo "Installing xcode-stuff"
xcode-select --install
## Test what shell is used
case $SHELL in
*/zsh)
profile="$HOME/.zshrc"
;;
*/bash)
profile="$HOME/.bash_profile"
;;
*)
exit
esac
# Homebrew
## Check for Homebrew, install if needed
if test ! $(which brew); then
echo "\nπ«π«π« Installing homebrew... π«π«π«\n"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> $profile
eval $(/opt/homebrew/bin/brew shellenv)
fi
## Add Homebrew taps
brew tap richardlehane/digipres
brew tap adoptopenjdk/openjdk
## Update homebrew recipes and apps
echo "\nπ«π«π« Updating homebrew... π«π«π«\n"
brew update
echo "\nπ«π«π« Updating packages installed with homebrew... π«π«π«\n"
brew upgrade
brew upgrade --cask
echo "\nπ«π«π« Installing packages... π«π«π«\n"
## Install command-line apps
### utilities
brew install git
brew install coreutils
brew install grep
brew install jq
brew install xmlstarlet
brew install tree
brew install wget
brew install trash
### file management
brew install p7zip
brew install rsync
brew install rclone
brew install gnu-tar
brew install awscli
brew install ntfs-3g
brew install clamav
### image audio video
brew install graphicsmagick
brew install ffmpeg
brew install mediainfo
brew install mpc
brew install flac
brew install sox
brew install exiftool
brew install mkvtoolnix
brew install mediaconch
brew install qcli
### born-digital
brew install bulk_extractor
brew install siegfried
brew install droid
brew install md5deep
brew install bagit
brew install disktype
### language version management
brew install rbenv
brew install jenv
brew install pyenv
## Install GUI apps
### desktop utilities
brew install --cask the-unarchiver
brew install --cask google-chrome
brew install --cask firefox
brew install --cask slack
brew install --cask microsoft-remote-desktop
brew install --cask microsoft-teams
brew install --cask zoom
brew install --cask keepingyouawake
### media
brew install --cask vlc
brew install --cask mediainfo
brew install --cask qctools
brew install --cask hex-fiend
brew install --cask disk-arbitrator
brew install --cask virtualbox
### data
brew install --cask db-browser-for-sqlite
brew install --cask tableplus
brew install --cask visual-studio-code
brew install --cask adoptopenjdk8
### quicklook plugins
brew install --cask quicklook-csv
brew install --cask qlmarkdown
brew install --cask quicklook-json
brew install --cask qlvideo
brew install --cask qladdict
## Install Mac App Store software
echo "\nπ«π«π« Sign-in to App Store manually before using mas π«π«π«\n"
brew install mas
# Update profile
echo "\nπ«π«π« Updating shell profile... π«π«π«\n"
## Configure code distribution managers
### Configure rbenv
if ! grep -q "rbenv" $profile; then
cat <<- 'END' >> $profile
# Configure rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
END
fi
### Configure jenv
if ! grep -q "jenv" $profile; then
echo hi
cat <<- 'END' >> $profile
# Configure jenv
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
END
fi
### Configure pyenv
if ! grep -q "pyenv" $profile; then
cat <<- 'END' >> $profile
# Configure pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
END
fi
## Configure aliases
### Add alias for VS Code
if ! grep -q "Visual Studio Code" $profile; then
cat <<- 'END' >> $profile
# Configure VS Code
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
END
fi
## Reload profile with modifications
source $profile
# Install language versions with managers
echo "\nπ«π«π« Updating default coding languages... π«π«π«\n"
## Ruby
ruby_version="2.7.3"
rbenv install $ruby_version
rbenv global $ruby_version
## Java
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
jenv global 1.8
## Python
python_version=$(pyenv install --list | sed 's/^ //' | grep '3.1\d' | grep -v - | grep -v b | tail -1)
pyenv install $python_version
pyenv global $python_version
# VS Code extensions
echo "\nπ«π«π« Updating VS Code extensions... π«π«π«\n"
## git extensions
code --install-extension github.vscode-pull-request-github
## markdown
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension yzhang.markdown-all-in-one
code --install-extension streetsidesoftware.code-spell-checker
## data formats
code --install-extension DotJoshJohnson.xml
code --install-extension mechatroner.rainbow-csv
## coding
code --install-extension ms-python.python
code --install-extension ms-toolsai.jupyter
## terminal
code --install-extension foxundermoon.shell-format
code --install-extension bmalehorn.shell-syntax
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-vscode-remote.remote-ssh-edit
# Configure Git
echo "\nπ«π«π« Configuring git... π«π«π«\n"
if !(git config --list | grep -q "user.email"); then
read -p "Email on Github (GraceHopper@nypl.org): " ghemail
git config --global user.email $ghemail
fi
if !(git config --list | grep -q "user.name"); then
read -p "Name on Github (\"GraceHopper\", quotes important): " ghname
git config --global user.name $ghname
fi
if !(git config --list | grep -q "core.editor"); then
git config --global core.editor "code"
fi
if !(git config --list | grep -q "excludesfile"); then
echo ".DS_Store\nThumbs.db" > ~/.gitignore
git config --global core.excludesfile ~/.gitignore
fi
# All done
echo "π«π«π«"
echo "π«π«π« All done! Please check output for errors π«π«π«"
echo "π«π«π«"