From 0936bbf1a68fcc930ea8d7d22e6e34b45a384256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Wed, 11 Oct 2023 15:59:24 +0200 Subject: [PATCH] Compute script_dir in a function to not "leak" it --- ci/buildserver-config.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/buildserver-config.sh b/ci/buildserver-config.sh index b6427f036ab4..a7fad340e1eb 100644 --- a/ci/buildserver-config.sh +++ b/ci/buildserver-config.sh @@ -3,7 +3,9 @@ # Buildserver configuration. Runtime values are defined here instead of # the scripts where they are used. -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +function script_dir { + ( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +} # Which gpg key to sign things with export CODE_SIGNING_KEY_FINGERPRINT="A1198702FC3E0A09A9AE5B75D5A1D4F266DE8DDF" @@ -15,7 +17,8 @@ SUPPORTED_DEB_CODENAMES+=("jammy" "focal" "lunar") export SUPPORTED_DEB_CODENAMES # Where to store deb repositories locally when building releases -export DEB_REPOSITORY_ARCHIVE_DIR="$SCRIPT_DIR/deb" +# shellcheck disable=SC2155 +export DEB_REPOSITORY_ARCHIVE_DIR="$(script_dir)/deb" # Servers to upload Linux deb/rpm repositories to export DEV_LINUX_REPOSITORY_SERVERS=("se-got-cdn-001.devmole.eu" "se-got-cdn-002.devmole.eu")