From 7fb538b1c5fcc9509f1747d7ec8ddf7ecf22b5a6 Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 21 Jun 2024 16:02:29 +0200 Subject: [PATCH] Refuse the situation when MYGNUTAR and MYTAR_C are both set. --- getting-credits/2024/tests/configure.sh | 10 +++++----- getting-credits/2024/tests/stef-config | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/getting-credits/2024/tests/configure.sh b/getting-credits/2024/tests/configure.sh index cdbf7f4f..a02879d6 100755 --- a/getting-credits/2024/tests/configure.sh +++ b/getting-credits/2024/tests/configure.sh @@ -36,11 +36,11 @@ if [[ -z $MYGNUTAR ]]; then exit 1 fi else -# if [[ -n $MYTAR_C ]]; then -# echo "ERROR: both MYGNUTAR and MYTAR_C are set. That is" \ -# "likely not what you want. Exiting." -# exit 1 -# fi + if [[ "$MYTAR_C" != $mytar_c_def_value ]]; then + echo "ERROR: both MYGNUTAR and MYTAR_C are set. That is" \ + "likely not what you want. Exiting." + exit 1 + fi echo "WARNING: Using '$MYGNUTAR' as the GNU tar testing binary." echo "WARNING: This is only for verifying the test setup." fi diff --git a/getting-credits/2024/tests/stef-config b/getting-credits/2024/tests/stef-config index 31f33d48..35805043 100644 --- a/getting-credits/2024/tests/stef-config +++ b/getting-credits/2024/tests/stef-config @@ -45,7 +45,8 @@ export MYTAR=${MYGNUTAR:-$(pwd)/$MYTARNAME} # You either set and export MYTAR_C to your mytar.c before running the test # suite, or set it in $STEF_CONFIG_LOCAL. -export MYTAR_C=${MYTAR_C:-"set-me-to-mytar.c-see-README"} +export mytar_c_def_value="set-me-to-mytar.c-see-README" +export MYTAR_C=${MYTAR_C:-$mytar_c_def_value} # You either set and export GNUTAR to the GNU tar binary path before running the # test suite, or set it in $STEF_CONFIG_LOCAL.