Files

33 lines
795 B
Bash
Executable File

#!/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