Created
May 12, 2014 18:15
-
-
Save izqui/171441777f939267af8d to your computer and use it in GitHub Desktop.
Deploy Go binaries to Raspberry Pi
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 | |
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