From 4bf865ba1b7cbfb32340d0f956ac0bcb29e60d40 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 14 Sep 2022 00:04:30 +0200 Subject: Use the EVENTLINE_JOB_NAME environment variable instead of reinventing the wheel --- common/clean.sh | 4 +--- common/git-clone.sh | 5 ++--- common/make.sh | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) (limited to 'common') diff --git a/common/clean.sh b/common/clean.sh index 1ce9e66..207bd78 100644 --- a/common/clean.sh +++ b/common/clean.sh @@ -1,6 +1,4 @@ #!/usr/bin/env bash set -euo pipefail -NAME=$1 - -rm -rf "/tmp/${NAME}" +rm -rf "/tmp/${EVENTLINE_JOB_NAME}" diff --git a/common/git-clone.sh b/common/git-clone.sh index d502aca..71f503c 100644 --- a/common/git-clone.sh +++ b/common/git-clone.sh @@ -1,10 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -NAME=$1 -URL=$2 +URL=$1 -WORKDIR="/tmp/${NAME}" +WORKDIR="/tmp/${EVENTLINE_JOB_NAME}" cleanup() { rm -rf "${WORKDIR}" diff --git a/common/make.sh b/common/make.sh index f103167..ea2f53c 100644 --- a/common/make.sh +++ b/common/make.sh @@ -1,10 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -NAME=$1 -TARGET=$2 +TARGET=$1 -WORKDIR="/tmp/${NAME}" +WORKDIR="/tmp/${EVENTLINE_JOB_NAME}" cleanup() { rm -rf "${WORKDIR}" -- cgit v1.2.3