Skip to content

Instantly share code, notes, and snippets.

@dgv
Created December 19, 2016 18:19
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 dgv/249b02b8519bf6771b508a112070de0c to your computer and use it in GitHub Desktop.
Save dgv/249b02b8519bf6771b508a112070de0c to your computer and use it in GitHub Desktop.
small script for google appengine golang sdk recompilation for other arch/os support
#!/bin/sh
if [ "$GAE_PATH" == "" ]; then
GAE_PATH=$HOME/go_appengine
end
if [ -d "$GAE_PATH" ]; then
echo "Google AppEngine SDK found!"
else
echo "Please download last AppEngine SDK (Go) and unpack on home dir or specify the location on GAE_PATH variable."
exit
fi
rm -rf $GAE_PATH/goroot/pkg/linux_amd64*
rm -rf $GAE_PATH/goroot/bin/*
rm -rf $GAE_PATH/godoc
echo "Deleted unsupported files"
err = `sh $GAE_PATH/goroot/make.bash 2> &1`
if [ "$err" == "" ] then
mv $GAE_PATH/goroot/bin/go $HOME/go_appengine/goroot/bin/goapp
echo "Rebuild complete! You can append $GAE_PATH on PATH!"
else
echo "Compilation error... "
echo $err
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment