Created
December 19, 2016 18:19
-
-
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
This file contains hidden or 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 [ "$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