Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/terraform: Cleanup for more current conventions

From: Thomas Boerger <thomas_at_webhippie.de>
Date: Tue, 5 Jul 2016 18:02:14 +0000

---
 testing/terraform/APKBUILD | 45 +++++++++++++++++++++------------------------
 1 file changed, 21 insertions(+), 24 deletions(-)
diff --git a/testing/terraform/APKBUILD b/testing/terraform/APKBUILD
index 8ff3881..83f722e 100644
--- a/testing/terraform/APKBUILD
+++ b/testing/terraform/APKBUILD
_at_@ -14,41 +14,40 @@ install=""
 subpackages=""
 source="${pkgname}-${pkgver}.tar.gz::https://github.com/hashicorp/terraform/archive/v$pkgver.tar.gz"
 
-_builddir="${srcdir}/terraform-${pkgver}"
+builddir="${srcdir}/terraform-${pkgver}"
 _godir="${srcdir}/go"
 _gourl="github.com/hashicorp/terraform"
 
-_providers="provider-atlas provider-aws provider-azure provider-azurerm provider-chef provider-clc provider-cloudflare provider-cloudstack provider-cobbler provider-consul provider-datadog provider-digitalocean provider-dme provider-dnsimple provider-docker provider-dyn provider-fastly provider-github provider-google provider-heroku provider-influxdb provider-librato provider-mailgun provider-mysql provider-null provider-openstack provider-packet provider-postgresql provider-powerdns provider-rundeck provider-softlayer provider-statuscake provider-template provider-terraform provider-tls provider-triton provider-ultradns provider-vcd provider-vsphere"
-_provisioners="provisioner-chef provisioner-file provisioner-local-exec provisioner-remote-exec"
+_providers="provider-atlas provider-aws provider-azure provider-azurerm
+	provider-chef provider-clc provider-cloudflare provider-cloudstack
+	provider-cobbler provider-consul provider-datadog provider-digitalocean
+	provider-dme provider-dnsimple provider-docker provider-dyn provider-fastly
+	provider-github provider-google provider-heroku provider-influxdb
+	provider-librato provider-mailgun provider-mysql provider-null
+	provider-openstack provider-packet provider-postgresql provider-powerdns
+	provider-rundeck provider-softlayer provider-statuscake provider-template
+	provider-terraform provider-tls provider-triton provider-ultradns
+	provider-vcd provider-vsphere"
 
-prepare() {
-	local i
-	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
+_provisioners="provisioner-chef provisioner-file provisioner-local-exec
+	provisioner-remote-exec"
 
 build() {
 	mkdir -p ${_godir}/bin ${_godir}/src/github.com/hashicorp
-	ln -sf ${_builddir} ${_godir}/src/github.com/hashicorp/terraform
+	ln -sf ${builddir} ${_godir}/src/github.com/hashicorp/terraform
 
 	cd ${_godir}/src/${_gourl}
 	export GOPATH="${_godir}"
 
 	go generate $(go list ./... | grep -v /vendor/)
-	go install -v ${_gourl}
+	go install -v ${_gourl} || return 1
 
-	for binary in ${_providers}
-	do
-		go install -v ${_gourl}/builtin/bins/${binary}
+	for binary in ${_providers}; do
+		go install -v ${_gourl}/builtin/bins/${binary} || return 1
 	done
 
-	for binary in ${_provisioners}
-	do
-		go install -v ${_gourl}/builtin/bins/${binary}
+	for binary in ${_provisioners}; do
+		go install -v ${_gourl}/builtin/bins/${binary} || return 1
 	done
 }
 
_at_@ -60,14 +59,12 @@ package() {
 	install -Dm755 terraform \
 		"${pkgdir}/usr/bin/terraform" || return 1
 
-	for binary in ${_providers}
-	do
+	for binary in ${_providers}; do
 		install -Dm755 ${binary} \
 			"${pkgdir}/usr/bin/terraform-${binary}" || return 1
 	done
 
-	for binary in ${_provisioners}
-	do
+	for binary in ${_provisioners}; do
 		install -Dm755 ${binary} \
 			"${pkgdir}/usr/bin/terraform-${binary}" || return 1
 	done
-- 
2.8.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jul 05 2016 - 18:02:14 GMT