mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-22 20:31:16 +00:00
Build with Go 1.3.3, also always use own Go instance.
This commit is contained in:
parent
af8f4858a7
commit
4705c93dcb
1 changed files with 19 additions and 21 deletions
|
@ -9,15 +9,14 @@ if [ ! -f "ext/syncthing/src/github.com/syncthing/syncthing/.git" ]; then
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for GOLANG installation
|
# Use own Go instance, installing it if missing.
|
||||||
if [ -z $GOROOT ]; then
|
mkdir -p "build"
|
||||||
mkdir -p "build"
|
tmpgo='build/go'
|
||||||
tmpgo='build/go'
|
if [ ! -f "$tmpgo/bin/go" ]; then
|
||||||
if [ ! -f "$tmpgo/bin/go" ]; then
|
# Download GOLANG v1.3.3
|
||||||
# Download GOLANG v1.3
|
wget -O go.src.tar.gz https://golang.org/dl/go1.3.3.src.tar.gz
|
||||||
wget -O go.src.tar.gz https://golang.org/dl/go1.3.src.tar.gz
|
|
||||||
sha1=$(sha1sum go.src.tar.gz)
|
sha1=$(sha1sum go.src.tar.gz)
|
||||||
if [ "$sha1" != "9f9dfcbcb4fa126b2b66c0830dc733215f2f056e go.src.tar.gz" ]; then
|
if [ "$sha1" != "b54b7deb7b7afe9f5d9a3f5dd830c7dede35393a go.src.tar.gz" ]; then
|
||||||
echo "go.src.tar.gz SHA1 checksum does not match!"
|
echo "go.src.tar.gz SHA1 checksum does not match!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -28,10 +27,9 @@ if [ -z $GOROOT ]; then
|
||||||
pushd $tmpgo/src
|
pushd $tmpgo/src
|
||||||
./make.bash --no-clean
|
./make.bash --no-clean
|
||||||
popd
|
popd
|
||||||
fi
|
|
||||||
# Add GO to the environment
|
|
||||||
export GOROOT="$(pwd)/$tmpgo"
|
|
||||||
fi
|
fi
|
||||||
|
# Add GO to the environment
|
||||||
|
export GOROOT="$(pwd)/$tmpgo"
|
||||||
|
|
||||||
# Add GO compiler to PATH
|
# Add GO compiler to PATH
|
||||||
export PATH=$PATH:$GOROOT/bin
|
export PATH=$PATH:$GOROOT/bin
|
||||||
|
|
Loading…
Reference in a new issue