Skip to content

Instantly share code, notes, and snippets.

@izqui
Created May 12, 2014 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save izqui/171441777f939267af8d to your computer and use it in GitHub Desktop.
Save izqui/171441777f939267af8d to your computer and use it in GitHub Desktop.
Deploy Go binaries to Raspberry Pi
#!/bin/sh
if [ $# -eq 0 ]
then
echo "$0 : You must provide destination host IP"
exit 1
fi
GOARCH=arm GOOS=linux go build
RET=$?
if [ $RET -eq 0 ]
then
file=${PWD##*/}
scp $file $1:go
ssh $1 chmod +x go/$file
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment