Skip to content

Instantly share code, notes, and snippets.

@overestimate
Last active March 18, 2021 04:34
Show Gist options
  • Save overestimate/487514fe8a93e4d90802ed1081cf9709 to your computer and use it in GitHub Desktop.
Save overestimate/487514fe8a93e4d90802ed1081cf9709 to your computer and use it in GitHub Desktop.
GoSnipe Easy Install Script
#!/bin/sh
if [ $(uname -s) = "Linux" ]
then
if [ $(uname -p) = "x86_64" ]
then
mkdir $HOME/GoSnipe; curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-linux-amd64; chmod 755 $HOME/GoSnipe/gosnipe; echo 'export PATH="$PATH:$HOME/GoSnipe"' >> $HOME/.profile
exit 0
elif [ $(uname -p) = "aarch64" ]
then
mkdir $HOME/GoSnipe; curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-linux-arm64; chmod 755 $HOME/GoSnipe/gosnipe; echo 'export PATH="$PATH:$HOME/GoSnipe"' >> $HOME/.profile
exit 0
else
echo Unsupported CPU architecture.
exit 1
fi
elif [ $(uname -s) = "Darwin" ]
then
if [ $(uname -p) = "i386" ]
then
mkdir $HOME/GoSnipe; curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-darwin-amd64; chmod 755 $HOME/GoSnipe/gosnipe; echo 'export PATH="$PATH:$HOME/GoSnipe"' >> $HOME/.profile
exit 0
elif [ $(uname -p) = "aarch64" ]
then
mkdir $HOME/GoSnipe; curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-darwin-arm64; chmod 755 $HOME/GoSnipe/gosnipe; echo 'export PATH="$PATH:$HOME/GoSnipe"' >> $HOME/.profile
exit 0
else
echo Unsupported CPU architecture.
exit 1
fi
else
echo Unknown/Unsupported platform.
exit 1
fi
#!/bin/sh
if [ $(uname -s) = "Linux" ]
then
if [ $(uname -p) = "x86_64" ]
then
curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-linux-amd64; chmod 755 $HOME/GoSnipe/gosnipe
exit 0
elif [ $(uname -p) = "aarch64" ]
then
curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-linux-arm64; chmod 755 $HOME/GoSnipe/gosnipe
exit 0
else
echo Unsupported CPU architecture.
exit 1
fi
elif [ $(uname -s) = "Darwin" ]
then
if [ $(uname -p) = "i386" ]
then
curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-darwin-amd64; chmod 755 $HOME/GoSnipe/gosnipe
exit 0
elif [ $(uname -p) = "aarch64" ]
then
curl -Lo $HOME/GoSnipe/gosnipe https://ci.appveyor.com/api/projects/overestimate/gosnipe/artifacts/gosnipe-darwin-arm64; chmod 755 $HOME/GoSnipe/gosnipe
exit 0
else
echo Unsupported CPU architecture.
exit 1
fi
else
echo Unknown/Unsupported platform.
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment