Last active
March 6, 2021 03:23
-
-
Save stunstunstun/97873c2f79f20090a7c8445cc3a1aae1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
<<COMMENT | |
✨ Simple Installation of the latest Brew, Cask, Git, Node.js, and visual-studio-code for OSX! | |
@Author: Minhyeok Jung | |
@License: MIT | |
[Example Usage] | |
Download this file, and from the directory, run in terminal | |
chmod +x configure-osx.sh | |
$ ./configure-osx.sh [username] [email] | |
COMMENT | |
if [ $# -ne 2 ] | |
then | |
echo '$ ./configure-osx.sh [username] [email]' | |
exit 1 | |
fi | |
USERNAME=$1 | |
EMAIL=$2 | |
# Apple Download CLI Tools | |
xcode-select --install | |
# Install Brew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Make sure Brew has permissions | |
brew doctor | |
# Update Brew | |
brew update | |
# Install nvm, Node.js | |
touch $HOME/.bashrc | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash | |
source $HOME/.bashrc | |
command -v nvm | |
nvm install 12 | |
nvm alias default 12 | |
node --version | |
# Updates npm packages | |
npm update npm -g | |
npm install yarn -g | |
# Install MongoDB and start mongod | |
brew install mongodb | |
mkdir -p $HOME/scripts/data/db | |
nohup mongod --dbpath $HOME/scripts/data/db &>/dev/null & | |
# Install Chrome, VSCode, iTerm2 | |
brew install --cask google-chrome | |
brew install --cask visual-studio-code | |
brew install --cask iterm2 | |
# Install JDK, jenv | |
brew tap homebrew/cask-versions | |
brew install --cask java | |
git clone https://github.com/gcuisinier/jenv.git ~/.jenv | |
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(jenv init -)"' >> ~/.bashrc | |
source $HOME/.bashrc | |
jenv versions | |
jenv global system | |
# jenv add /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/ | |
java --version | |
# Install python3 | |
PYTHON_VERSION=3.7.0 | |
brew install zlib | |
brew install pyenv | |
pyenv install $PYTHON_VERSION | |
pyenv shell $PYTHON_VERSION | |
python --version | |
pip install --upgrade pip | |
pip --version | |
# Add pyenv plugins and configure bashrc | |
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv | |
echo ' | |
export LDFLAGS="-L/usr/local/opt/openssl/lib" | |
export CPPFLAGS="-I/usr/local/opt/openssl/include" | |
export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig" | |
export PYENV_VERSION=$PYTHON_VERSION | |
export PATH="$HOME/.pyenv:$PATH" | |
export PATH="$HOME/.local/bin:$PATH" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
' >> ~/.bashrc | |
# Install Docker | |
brew install --cask docker | |
docker --version | |
docker-compose --version | |
docker run hello-world | |
# Git | |
brew install git git-lfs | |
git config --global user.name "$USERNAME" | |
git config --global user.email "$EMAIL" | |
git config --global core.precomposeunicode true | |
git config --global core.quotepath false | |
# Apply sources | |
source $HOME/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!