Last active
March 4, 2022 06:59
-
-
Save theothermutahhir/34f7168f5f5f1b83022b223d8b679735 to your computer and use it in GitHub Desktop.
Install dependencies script for reread
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 | |
set -eo pipefail | |
echo "" | |
echo "Installing common dependencies" | |
echo "" | |
if ! $(command -v brew &> /dev/null); then | |
echo "Installing Homebrew" | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
else | |
echo "Homebrew installed, updating" | |
brew update | |
fi | |
echo "Installing Docker" | |
if ! $(command -v docker &> /dev/null); then | |
brew install docker | |
else | |
brew upgrade docker | |
fi | |
echo "Docker installed" | |
echo "" | |
echo "Installing Server Dependencies" | |
echo "" | |
if ! $(command -v go &> /dev/null); then | |
brew install go | |
else | |
brew upgrade go | |
fi | |
if ! $(command -v golangci-lint &> /dev/null); then | |
brew install golangci-lint | |
brew upgrade golangci-lint | |
else | |
brew upgrade golangci-lint | |
fi | |
if ! $(command -v air &> /dev/null); then | |
curl -sSfL \ | |
https://raw.githubusercontent.com/cosmtrek/air/master/install.sh \ | |
| bash -s -- -b $(go env GOPATH)/bin | |
else | |
echo "Air installed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment