Skip to content

Instantly share code, notes, and snippets.

@struCoder
Last active April 11, 2017 05:58
Show Gist options
  • Save struCoder/fee6e29a79ce076af11e0bdd7fdc553e to your computer and use it in GitHub Desktop.
Save struCoder/fee6e29a79ce076af11e0bdd7fdc553e to your computer and use it in GitHub Desktop.
install_pmgo
#!/bin/sh
version="0.1.0"
UNAME=$(uname)
# Check to see if it starts with MINGW.
if [ "$UNAME" ">" "MINGW" -a "$UNAME" "<" "MINGX" ] ; then
echo "current release do not support windows"
exit 1
fi
if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then
echo "Sorry, this OS is not supported yet via this installer."
exit 1
fi
wget https://github.com/struCoder/pmgo/archive/v${version}.tar.gz
tar -zxvf v${version}.tar.gz
cd pmgo-${version}
echo "build pmgo..."
go build -o /usr/local/bin/pmgo pmgo.go
echo "build done"
cd ..
echo "rm build files"
rm -rf pmgo-${version}
rm v${version}.tar.gz
echo "all down."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment