-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNewMachineSetup.sh
executable file
·60 lines (49 loc) · 1.27 KB
/
NewMachineSetup.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
#!/usr/bin/env bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/runner/.bash_profile
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/runner/.bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
brew update
packages=()
while IFS= read -r line; do
packages+=("$line")
done <brews.txt
caskss=()
while IFS= read -r line; do
casks+=("$line")
done <casks.txt
install () {
brew install $1
return $?
}
install-cask () {
brew install --cask $1
return $?
}
uninstall () {
brew uninstall $1
brew $?
}
force_link () {
brew link --overwrite $1
}
for package in ${packages[@]}; do
install $package
[ $? -eq 0 ] && echo "$package was installed successfully" || "$package was not installed for some reason and we could not correct this."
done
for cask in ${casks[@]}; do
install-cask $cask
[ $? -eq 0 ] && echo "$cask was installed successfully" || "$cask was not installed for some reason and we could not correct this."
done
install-pip () {
pip install -r requirements.txt
return $?
}
install-pip
install-gems () {
bundle install
return $?
}
install-gems