-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·60 lines (48 loc) · 1.46 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
#!/usr/bin/env bash
# Portability and safety concerns
# https://github.com/anordal/shellharden/blob/7a5a3d64f4e2e0b43d63a3f8cabf12bc2eaa675b/how_to_do_things_safely_in_bash.md
set -euo pipefail
shopt -s nullglob
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "Run Linux instructions"
./setup/linux.sh
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "Run MacOS install setup"
./setup/macos.sh
else
echo "$OSTYPE is not a supported install target! Oh well!" >&2
exit 1
fi
if ! grep --quiet "$(command -v fish)" /etc/shells ; then
echo "Installing fish into /etc/shells"
command -v fish | sudo tee -a /etc/shells
fi
echo "Changing shell to fish"
sudo usermod -s "$(command -v fish)" "${USER}"
echo "Installing stow configuration <whoaa>"
stow stow
echo "Stow configuration installed!"
echo "Installing fish configuration!"
stow fish
echo "Fish configuration installed!"
echo "Installing git configuration!"
stow git
echo "Git configuration installed!"
echo "Installing hyper configuration!"
stow hyper
echo "Hyper configuration installed!"
echo "Installing vim configuration!"
stow vim
echo "Vim configuration installed!"
echo "Installing Rust Lang"
if ! [[ -x "$(command -v rustc)" ]]; then
curl https://sh.rustup.rs -sSf | sh -s -- -y
fi
$(command -v fish) -c "~/.cargo/bin/rustup update"
$(command -v fish) -c "~/.cargo/bin/rustup completions fish"
echo "Rust installed!"
echo "Installing Global NPM Tools"
npm install -g \
create-react-app \
yarn
echo "NPM Tools installed!"