Last active
June 28, 2022 21:16
-
-
Save kienstra/af4f8ad4c0606343eeb09e7de117ed93 to your computer and use it in GitHub Desktop.
Installs CLI packages, like Node and Composer
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 | |
# Usage: | |
# curl -o- https://gist.githubusercontent.com/kienstra/af4f8ad4c0606343eeb09e7de117ed93/raw/84d11672958d6d5802fd2cd5cd0c35083dbb7cfc/CLI%2520Setup | bash | |
echo "Checking that git is installed…" | |
if [ "$(git --version)" ] | |
then | |
echo "git is installed, as expected" | |
else | |
echo "Please install git" | |
fi | |
if [ ! -f ~/.zshrc ] | |
then | |
echo "source ~/.nvm/nvm.sh" > ~/.zshrc | |
fi | |
echo "Installing homebrew. You might be asked for your password for sudo access." | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install)" | |
echo "Installing composer and coreutils via homebrew…" | |
brew install composer | |
brew install coreutils | |
echo "Installing nvm…" | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | |
# Ensure this can run nvm without opening a new Terminal tab. | |
source ~/.zshrc | |
nvm install node | |
nvm install 14 | |
nvm use 14 | |
echo "Success! You now have node and composer installed." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, great idea. Just added your idea of creating a
.zshrc
file with that single line.