diff --git a/wizard-work/spark/verify_structure.sh b/wizard-work/spark/verify_structure.sh new file mode 100755 index 0000000..6210db6 --- /dev/null +++ b/wizard-work/spark/verify_structure.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Verification script: checks that the artifact directory structure exists and has correct permissions + +set -e + +REQUIRED_DIR="/root/.hermes/wizard-outputs/spark" +REQUIRED_FILE="$REQUIRED_DIR/verify_structure.sh" +MARKER="$REQUIRED_DIR/.verifier_passed" + +# Check directory exists +if [ ! -d "$REQUIRED_DIR" ]; then + echo "FAIL: Directory $REQUIRED_DIR does not exist" + exit 1 +fi + +# Check this script exists (we're running from it) +if [ ! -f "$REQUIRED_FILE" ]; then + echo "FAIL: Script file missing" + exit 1 +fi + +# Create marker file to prove success +touch "$MARKER" + +if [ -f "$MARKER" ]; then + echo "SUCCESS: Artifact structure verified" + echo "Directory: $REQUIRED_DIR" + echo "Marker: $MARKER" + exit 0 +else + echo "FAIL: Could not create marker" + exit 1 +fi \ No newline at end of file