summaryrefslogtreecommitdiff
path: root/bootstrap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh57
1 files changed, 13 insertions, 44 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index d1f7e77..691af72 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,46 +1,15 @@
#!/bin/sh
-set -e
-
-export GOPATH=`pwd`/.gopath
-
-echo -n "Fetching (go get) source ... "
-go get -d github.com/equinox0815/acme/cmd/acmetool
-echo "done."
-
-echo -n "Switching to correct branch ... "
-git -C $GOPATH/src/github.com/equinox0815/acme/cmd/acmetool co seperate-redirector > /dev/null 2>&1
-echo "done."
-
-echo -n "Building acmetool ... "
-export CGO_ENABLED=0
-export GOOS=linux
-
-export GOARCH=amd64
-go build -a -o acmetool.amd64 github.com/equinox0815/acme/cmd/acmetool
-echo -n "amd64 "
-
-export GOARCH=386
-go build -a -o acmetool.i386 github.com/equinox0815/acme/cmd/acmetool
-echo -n "i386 "
-
-export GOARCH=arm64
-go build -a -o acmetool.arm64 github.com/equinox0815/acme/cmd/acmetool
-echo -n "arm64 "
-
-export GOARCH=arm
-export GOARM=7
-go build -a -o acmetool.armhf github.com/equinox0815/acme/cmd/acmetool
-echo -n "armhf "
-
-export GOARCH=arm
-export GOARM=6
-go build -a -o acmetool.raspbian github.com/equinox0815/acme/cmd/acmetool
-echo -n "raspbian "
-
-export GOARCH=arm
-export GOARM=5
-go build -a -o acmetool.armel github.com/equinox0815/acme/cmd/acmetool
-echo -n "armel "
-
-echo " ... done."
+VERSION=0.0.20
+
+echo -n "Fetching release tarballs ... "
+for arch in amd64:amd64 386:i386 arm:armhf; do
+ goarch=${arch%:*}
+ debarch=${arch#*:}
+ wget -nc https://github.com/hlandau/acme/releases/download/v$VERSION/acmetool-v$VERSION-linux_$goarch.tar.gz 2> /dev/null
+ tar -xzf acmetool-v$VERSION-linux_$goarch.tar.gz -O > acmetool.$debarch
+ echo -n "$goarch "
+ rm acmetool-v$VERSION-linux_$goarch.tar.gz
+done
+
+echo ""