#!/bin/bash # Tool: getlibreportal "publish" — assemble the download host's docroot # (install.sh + the dist/ release artifacts) into its served data dir. # Runs as the container user (it owns the data dir); reads the manager-owned # install tree. Build-box only — needs a populated dist/ (run make_release first). appGetlibreportalPublish() { isHeader "Publish downloads (getlibreportal)" local app=getlibreportal local pub="${install_containers_dir}${app}/publish.sh" local data="${containers_dir}${app}/data" [[ -f "$pub" ]] || { isError "publish.sh not found at $pub — full repo checkout needed."; return 1; } runFileOp mkdir -p "$data" if runFileOp bash "$pub" "$data"; then isSuccessful "Downloads published. Restart $app to serve it." else isError "Publish failed (is dist/ present? run scripts/release/make_release.sh first)." return 1 fi }