chiark / gitweb /
comprehensive-test: Actually allow OLD_SECNET_DIR set to ''
[secnet.git] / comprehensive-test
index d8cf07d20ccebaa3366cd0c87d230669f028dc6d..1d5ee7f4262c699e1968fe1a5fe08c34bea587fc 100755 (executable)
@@ -15,6 +15,19 @@ for arg in "$@"; do
     esac
 done
 
+case "${OLD_SECNET_DIR-:?must be set, perhaps to the empty string}" in
+    ''|/*)
+        ;;
+    ../*)
+       OLD_SECNET_DIR="${PWD%/*}/${OLD_SECNET_DIR#../}"
+       echo >&2 "x OLD_SECNET_DIR=$OLD_SECNET_DIR"
+       ;;
+    *)
+       echo >&2 "relative non-.. OLD_SECNET_DIR $OLD_SECNET_DIR !";
+       exit 1
+       ;;
+esac
+
 x () { echo >&2 "x $*"; "$@"; }
 
 srcdir=$(pwd)