diff options
| -rw-r--r-- | org/test_shell_script_ssp_document_abstraction.org | 12 | ||||
| -rwxr-xr-x | test/test-abstraction-ssp.sh | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/org/test_shell_script_ssp_document_abstraction.org b/org/test_shell_script_ssp_document_abstraction.org index 18b04ef..dbff60c 100644 --- a/org/test_shell_script_ssp_document_abstraction.org +++ b/org/test_shell_script_ssp_document_abstraction.org @@ -44,6 +44,18 @@ set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SPINE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +# $SpinePOD names the sample pod directory, relative to the spine directory. +# Unset, "$SPINE_DIR/$SpinePOD" is the spine directory itself, which exists, +# so the "sample documents not found" check below would not catch it and +# spine would be handed every file in the spine tree. +if [ -z "$SpinePOD" ]; then + echo "ERROR: \$SpinePOD is not set." >&2 + echo " Set it to the sample pod directory, relative to $SPINE_DIR" >&2 + echo " e.g. SpinePOD=../../markup/sisudoc-spine-samples/markup/pod-samples/pod" >&2 + exit 2 +fi + SAMPLES_RAW="$SPINE_DIR/$SpinePOD" if [ -d "$SAMPLES_RAW" ]; then SAMPLES_DIR="$(cd "$SAMPLES_RAW" && pwd)" diff --git a/test/test-abstraction-ssp.sh b/test/test-abstraction-ssp.sh index d03f70c..f7b85c0 100755 --- a/test/test-abstraction-ssp.sh +++ b/test/test-abstraction-ssp.sh @@ -22,6 +22,18 @@ set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SPINE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +# $SpinePOD names the sample pod directory, relative to the spine directory. +# Unset, "$SPINE_DIR/$SpinePOD" is the spine directory itself, which exists, +# so the "sample documents not found" check below would not catch it and +# spine would be handed every file in the spine tree. +if [ -z "$SpinePOD" ]; then + echo "ERROR: \$SpinePOD is not set." >&2 + echo " Set it to the sample pod directory, relative to $SPINE_DIR" >&2 + echo " e.g. SpinePOD=../../markup/sisudoc-spine-samples/markup/pod-samples/pod" >&2 + exit 2 +fi + SAMPLES_RAW="$SPINE_DIR/$SpinePOD" if [ -d "$SAMPLES_RAW" ]; then SAMPLES_DIR="$(cd "$SAMPLES_RAW" && pwd)" |
