# shellcheck shell=bash # cmd_web — assemble the archived site and apply the seed layer. # Syncing to FS01 arrives with phase 7, once the VM exists. cmd_web() { local site="$LAB_DIR/web/site" seed="$LAB_DIR/web/seed" step "assemble" python3 "$LAB_DIR/scripts/prepare_site.py" || die "site assembly failed" step "seed layer" [[ -d $seed ]] || die "missing $seed" cp -a "$seed/." "$site/" ok "seed applied: $(find "$seed" -type f | wc -l) file(s)" step "layout" printf ' %-34s %s\n' "public/IT-inventaire.txt" \ "$([[ -f $site/public/IT-inventaire.txt ]] && echo present || echo MISSING)" printf ' %-34s %s\n' "robots.txt" \ "$([[ -f $site/robots.txt ]] && echo present || echo MISSING)" printf ' %-34s %s\n' "index.html" \ "$([[ -f $site/index.html ]] && echo present || echo MISSING)" printf '\n' ok "web root ready: ${site#$LAB_DIR/}" info " preview: python3 -m http.server 8080 --directory ${site#$LAB_DIR/}" info " sync to FS01 arrives in phase 7" }