summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-02-03 16:54:10 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-02-03 16:54:10 +0100
commite63201efc11bf44a7d30fff0a82a9fefd29b8d46 (patch)
tree31a55e3232419a0dc0cbe10159b9c4ad2a03c31a
parentdda4b069d5a0ce8d377ccd355a48959fdec1e110 (diff)
downloadrules-sandbox-e63201efc11bf44a7d30fff0a82a9fefd29b8d46.tar.gz
rules-sandbox-e63201efc11bf44a7d30fff0a82a9fefd29b8d46.tar.bz2
rules-sandbox-e63201efc11bf44a7d30fff0a82a9fefd29b8d46.tar.xz
rules-sandbox-e63201efc11bf44a7d30fff0a82a9fefd29b8d46.zip
Moving utils to bin/.
-rw-r--r--.settings.sh3
-rwxr-xr-xbin/mvnw (renamed from mvnw)0
-rw-r--r--bin/mvnw.cmd (renamed from mvnw.cmd)0
-rw-r--r--bin/terraform22
4 files changed, 25 insertions, 0 deletions
diff --git a/.settings.sh b/.settings.sh
index 6cdf786..171193b 100644
--- a/.settings.sh
+++ b/.settings.sh
@@ -1,2 +1,5 @@
alias mvn="$(pwd)/mvnw"
alias engine="java --enable-preview -jar $(echo $(pwd)/module/ri-engine/target/*.jar)"
+
+echo "Adding bin/ to PATH"
+export PATH=$(pwd)/bin:$PATH
diff --git a/mvnw b/bin/mvnw
index 190d73b..190d73b 100755
--- a/mvnw
+++ b/bin/mvnw
diff --git a/mvnw.cmd b/bin/mvnw.cmd
index 4b98b78..4b98b78 100644
--- a/mvnw.cmd
+++ b/bin/mvnw.cmd
diff --git a/bin/terraform b/bin/terraform
new file mode 100644
index 0000000..554ea8b
--- /dev/null
+++ b/bin/terraform
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -euo pipefail
+
+basedir=$(dirname "$0")
+
+version=0.14.5
+url=https://releases.hashicorp.com/terraform/${version}/terraform_${version}_linux_amd64.zip
+
+bin="$basedir/.tmp/$version/terraform"
+
+if [[ ! -x "$bin" ]]
+then
+ mkdir -p $(dirname "$bin")
+ wget -O "$bin.zip" "$url"
+ cd $(dirname "$bin")
+ unzip "$bin.zip" terraform
+ chmod +x terraform
+ cd -
+fi
+
+exec "$bin" "${@}"