-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·74 lines (62 loc) · 2.06 KB
/
install.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
68
69
70
71
72
73
74
#!/bin/bash
# TODO: add wrappers around each install to doublecheck whether they have already been installed.
# Prompt user whether they desire to install the packages if so.
# Install all necessary dependencies for dev environment
if [[ "$OSTYPE" == "darwin"* ]] || \
[[ "$OSTYPE" == "linux-gnu" ]]
then
echo "========================================================"
echo "Setting up development environment for $OSTYPE"
echo "========================================================"
echo "[========INSTALLING DEPENDENCIES========]"
# install homebrew
which brew
if [[ $? != 0 ]]; then
echo "Installing homebrew"
/bin/bash -c \
"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# add Homebrew to path if linux-gnu system
if [[ "$OSTYPE" = "linux-gnu" ]]; then
echo "Detected Linux env. Running the following commands"
$HOME/.linuxbrew/bin/brew shellenv
echo ""
eval $($HOME/.linuxbrew/bin/brew shellenv)
fi
else
echo "Updating homebrew"
brew update
fi
# install brew formulae
brew install git
brew install [email protected]
brew install the_silver_searcher
brew install neovim
brew install tmux
brew install node
brew install yarn
brew install broot
brew install fzf
# install zsh
which zsh
if [[ $? != 0 ]]; then
brew install zsh
fi
# guis
if [[ "$OSTYPE" == "darwin"* ]]; then
brew cask install iterm2
fi
brew upgrade
which zplug
if [[ $? != 0 ]]; then
echo "Installing zplug"
curl -sL --proto-redir \
-all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
fi
echo "Install/upgrading pip"
pip3 install -U pip
echo "======================================"
echo "Finished development environment setup"
echo "======================================"
else
echo "Unsupported OS [${OSTYPE}]. Manual installation required."
fi