Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions scripts/spotify-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh -e

. ../../common-script.sh

installSpotify() {
if ! brewprogram_exists spotify; then
printf "%b\n" "${YELLOW}Installing Spotify...${RC}"
brew install --cask spotify
if [ $? -ne 0 ]; then
printf "%b\n" "${RED}Failed to install Spotify. Please check your Homebrew installation or try again later.${RC}"
exit 1
fi
printf "%b\n" "${GREEN}Spotify installed successfully!${RC}"
else
printf "%b\n" "${GREEN}Spotify is already installed.${RC}"
fi
}

checkEnv
installSpotify