Last active
July 2, 2019 22:23
-
-
Save aviaviavi/860638ec8d3728ea74ed36176cd26173 to your computer and use it in GitHub Desktop.
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/sh | |
PLATFORM="" | |
if [[ "$OSTYPE" == "linux-gnu" ]]; then | |
echo "Installing scarf on linux" | |
PLATFORM="linux" | |
elif [[ "$OSTYPE" == "darwin"* ]]; then | |
echo "Installing scarf on mac" | |
PLATFORM="mac" | |
else | |
echo "Sorry, Scarf is not yet supported on your platform. Open up an issue on github or email help@scarf.sh to let us know you'd like scarf for your platform" | |
exit 255 | |
fi | |
echo "Please note that Scarf will send anonymized package usage statistics to their respective software developers. To learn more, see https://docs.scarf.sh" | |
pushd . >> /dev/null | |
cd /tmp || (echo "no /tmp directory found to extract scarf into" && exit 1) | |
wget "https://s3.us-west-2.amazonaws.com/scarf-sh/downloads/scarf/latest/scarf-${PLATFORM}.tar.gz" -O scarf.tar.gz | |
tar -zxvf scarf.tar.gz | |
mkdir -p ~/.scarf/original | |
mkdir -p ~/.scarf/bin | |
mkdir -p ~/.scarf/include | |
cp scarf ~/.scarf/bin | |
popd >> /dev/null | |
echo "Installation successful! Scarf will install programs into ~/.scarf/bin, so please add it to your PATH." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment