From cdbff2f5f6126929ab46a743ffaddbfbb5a9cfd3 Mon Sep 17 00:00:00 2001 From: David Ibia Date: Wed, 12 Jun 2024 19:37:19 +0100 Subject: [PATCH] chore(setup-mac.sh): add checks and installations for coreutils, OhMyPosh, and asdf to improve setup script functionality --- setup-mac.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/setup-mac.sh b/setup-mac.sh index 2b9b739..1fce15d 100755 --- a/setup-mac.sh +++ b/setup-mac.sh @@ -31,6 +31,38 @@ else brew install git fi +# Check if coreutils is installed + +if command -v gdate &> /dev/null; then + echo "coreutils is installed." +else + echo "coreutils is not installed." + echo "Installing coreutils..." + brew install coreutils +fi + +# Check if OhMyPosh is installed + +if command -v oh-my-posh &> /dev/null; then + echo "OhMyPosh is installed." +else + echo "OhMyPosh is not installed." + echo "Installing OhMyPosh..." + brew install jandedobbeleer/oh-my-posh/oh-my-posh +fi + +# Check if asdf is installed +if command -v asdf &> /dev/null; then + echo "asdf is installed." +else + echo "asdf is not installed." + echo "Installing asdf..." + brew install asdf + + echo "Adding asdf plugins..." + asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git +fi + # Check if NodeJS is installed if command -v node &> /dev/null; then echo "NodeJS is installed."