aboutsummaryrefslogtreecommitdiff
path: root/common/git-clone.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common/git-clone.sh (renamed from common/make-run.sh)9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/make-run.sh b/common/git-clone.sh
index 8c719b2..1a1a89c 100644
--- a/common/make-run.sh
+++ b/common/git-clone.sh
@@ -1,15 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
+# Input environment:
+# - NAME: a name for the script/tasks
+# - URL: the url of the repository to clone
+
WORKDIR="/tmp/${NAME}"
cleanup() {
- cd /
rm -rf "${WORKDIR}"
}
trap cleanup EXIT
git clone -q "${URL}" "${WORKDIR}"
-cd "${WORKDIR}"
-make run
+
+trap - EXIT