mirror of
https://github.com/vxcontrol/external-dns.git
synced 2026-07-21 06:05:22 -04:00
30 lines
718 B
Bash
Executable File
30 lines
718 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
install_go()
|
|
{
|
|
# Taken from Google/golang Dockerfile...
|
|
apt-get update -y && apt-get install --no-install-recommends -y -q curl build-essential \
|
|
ca-certificates git mercurial bzr
|
|
mkdir /goroot && curl https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
|
|
echo $PWD
|
|
echo "export GOROOT=\"/goroot\"" > ./build/bootstrap.envs
|
|
echo "export PATH=\"$PATH:/goroot/bin\"" >> ./build/bootstrap.envs
|
|
}
|
|
|
|
|
|
mkdir -p ./build
|
|
|
|
if [ ! $(command -v go) ]; then
|
|
echo "Going to try installing Go..."
|
|
install_go
|
|
fi
|
|
|
|
if [ -x "$(which xz)" ]; then
|
|
apt-get update
|
|
apt-get install -y xz-utils
|
|
fi
|