-
-
Save tymoshenko/929870090631144aea7e5361829d80ff to your computer and use it in GitHub Desktop.
TidalCycles Installer Script for Mac OS https://tidalcycles.org/index.php/MacOS_installation
This file contains hidden or 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 | |
# Author: James Campbell | |
# Date: September 2019 | |
# Last Updated: September 2019 | |
# Contact: [email protected] | |
# What: tidalcycles installer script for OSX | |
#### COLORS | |
COLOR_PURPLE='\033[0;35m' | |
normal='\033[0m' | |
#### CHECK FOR MAC OS | |
if [[ "$OSTYPE" == "darwin"* ]]; then | |
printf "$COLOR_PURPLE[0]$normal Mac OS detected, moving forward with installation...\n" | |
else | |
echo "Mac OS not detected, this script is for Mac OS or OSX only." && exit 1 | |
fi | |
#### CHECK FOR HOMEBREW | |
if command -v brew 2>/dev/null; then | |
printf "$COLOR_PURPLE[1]$normal Homebrew found, installing Super Collider..." | |
brew cask install supercollider | |
else | |
echo "Install homebrew first at https://brew.sh" | |
exit 1 | |
fi | |
#### CHECK FOR HASKELL | |
if command -v cabal 2>/dev/null; then | |
printf "$COLOR_PURPLE[2]$normal Haskell found, skipping...\n" | |
else | |
printf "$COLOR_PURPLE[2]$normal Installing Haskell via ghcup...\n" | |
curl https://get-ghcup.haskell.org -sSf | sh | |
fi | |
#### CHECK FOR GIT | |
if command -v git 2>/dev/null; then | |
printf "$COLOR_PURPLE[3]$normal git found, skipping...\n" | |
else | |
printf "$COLOR_URPLE[3]$normal installing git...\n" | |
brew install git | |
fi | |
#### INSTALL TIDALCYCLES | |
printf "$COLOR_PURPLE[4]$normal Congratulations, you have all the pre-reqs...\n" | |
echo "Installing tidalcycles via cabal..." | |
echo "" | |
. "$HOME/.ghcup/env" | |
echo '. $HOME/.ghcup/env' >> "$HOME/.bashrc" | |
cabal update | |
cabal install tidal --lib | |
#### OPEN SUPERCOLLIDER TO CREATE DIRS | |
printf "Opening SuperCollider and closing in background to initialize Extensions directory..." | |
sudo spctl --master-disable | |
open -j -g -a SuperCollider | |
sudo spctl --master-enable | |
sleep 5 | |
killall SuperCollider | |
#### INSTALL PLUGINS | |
printf "$COLOR_PURPLE[5]$normal Installing SuperCollider Plugins...\n" | |
wget https://github.com/supercollider/sc3-plugins/releases/download/Version-3.10.0/sc3-plugins-3.10.0-macOS.zip -O /tmp/sc3.zip | |
unzip -q /tmp/sc3.zip -d ~/Library/Application\ Support/SuperCollider/Extensions/ | |
#### INSTALL SUPERDIRT | |
echo "Follow the instructions on the screen in SuperCollider to finish the install, enjoy!" | |
echo "Help and further info at: https://tidalcycles.org/index.php/MacOS_installation" | |
printf '// Place your cursor on the line below and press Shift-Enter\ninclude("SuperDirt")\n restart SuperCollider and GTG\n' > /tmp/superdirt.scd | |
open /tmp/superdirt.scd | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment