aboutsummaryrefslogtreecommitdiff
path: root/common/make-run.sh
diff options
context:
space:
mode:
authorJulien Dessaux2022-09-05 00:04:35 +0200
committerJulien Dessaux2022-09-05 23:51:17 +0200
commit29e6c829e3259bcf856b00ecb2137a3ad4676271 (patch)
treedb9833ee0df2f6f051ba38d3d1ae2e5425bd62b1 /common/make-run.sh
parentRemoved hello and added ev-scripts deploy (diff)
downloadev-scripts-29e6c829e3259bcf856b00ecb2137a3ad4676271.tar.gz
ev-scripts-29e6c829e3259bcf856b00ecb2137a3ad4676271.tar.bz2
ev-scripts-29e6c829e3259bcf856b00ecb2137a3ad4676271.zip
Factorised ev-scripts-deploy in a generic git clone && make run
Diffstat (limited to 'common/make-run.sh')
-rw-r--r--common/make-run.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/make-run.sh b/common/make-run.sh
new file mode 100644
index 0000000..8c719b2
--- /dev/null
+++ b/common/make-run.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+WORKDIR="/tmp/${NAME}"
+
+cleanup() {
+ cd /
+ rm -rf "${WORKDIR}"
+}
+
+trap cleanup EXIT
+
+git clone -q "${URL}" "${WORKDIR}"
+cd "${WORKDIR}"
+make run