#!/usr/bin/env bash
# Setup script for sec-005-xss-vulnerability-scan
set -euo pipefail

TASK_DIR="$(cd "$(dirname "$0")/.." && pwd)"
WORKSPACE="${1:-$TASK_DIR/workspace}"

mkdir -p "$WORKSPACE/templates"
cp "$TASK_DIR/environment/data/profile.html" "$WORKSPACE/templates/profile.html"
cp "$TASK_DIR/environment/data/search.html" "$WORKSPACE/templates/search.html"
cp "$TASK_DIR/environment/data/comment.html" "$WORKSPACE/templates/comment.html"
cp "$TASK_DIR/environment/data/dashboard.html" "$WORKSPACE/templates/dashboard.html"
cp "$TASK_DIR/environment/data/settings.html" "$WORKSPACE/templates/settings.html"
echo "Workspace ready with template files"
