Skip to content

Instantly share code, notes, and snippets.

@fujiwara
Created November 17, 2009 15:07
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 fujiwara/236959 to your computer and use it in GitHub Desktop.
Save fujiwara/236959 to your computer and use it in GitHub Desktop.
#!/bin/sh
SOURCE=$1
if [ "$GOARCH" = "386" ]; then
GO="8"
elif [ "$GOARCH" = "amd64" ]; then
GO="6"
elif [ "$GOARCH" = "arm" ]; then
GO="5"
fi
OBJ=`echo $SOURCE | sed -e "s/\.go/.${GO}/"`
COMPILE="${GO}g"
LINK="${GO}l"
CMD="./${GO}.out"
$COMPILE $SOURCE && $LINK $OBJ && $CMD "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment