#!/usr/bin/env bash # Created by John A. Hoeven with the ethical assistance of Claude AI # --------------------------------------------------------------------------- # deploy.sh # ~/projects/ceos/alpine-installer/deploy.sh # Version: v0.0.1 | Status: DEVELOPMENT # Target: workbench (Pi 5, Alpine aarch64) — run on workbench, not tinkerpad # --------------------------------------------------------------------------- # Copies the script tree to /srv/repo/scripts/alpine-ceos-installer/ so # tinkerpad can fetch files via bootstrap.sh. # # TODO — Forgejo: when git.jahnet.lan is deployed, replace this script with: # git push origin dev # --------------------------------------------------------------------------- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DEPLOY_TARGET="/srv/repo/scripts/alpine-ceos-installer" echo "CE OS Alpine Installer — Deploy to serve tree" echo "Source: ${SCRIPT_DIR}" echo "Target: ${DEPLOY_TARGET}" echo "" read -r -p "Proceed with deploy? [y/N] " confirm [[ "${confirm,,}" == "y" ]] || { echo "Aborted."; exit 0; } doas mkdir -p \ "${DEPLOY_TARGET}/lib/base" \ "${DEPLOY_TARGET}/lib/minimal" \ "${DEPLOY_TARGET}/lib/basic" \ "${DEPLOY_TARGET}/tests" \ "${DEPLOY_TARGET}/spec" doas cp -r "${SCRIPT_DIR}/." "${DEPLOY_TARGET}/" doas chmod +x \ "${DEPLOY_TARGET}"/*.sh \ "${DEPLOY_TARGET}"/lib/base/*.sh \ "${DEPLOY_TARGET}"/lib/minimal/*.sh \ "${DEPLOY_TARGET}"/lib/basic/*.sh \ "${DEPLOY_TARGET}"/tests/*.sh echo "" echo "Deploy complete." echo "Pull URL: http://192.168.0.138/scripts/alpine-ceos-installer/" echo "Bootstrap: wget http://192.168.0.138/scripts/alpine-ceos-installer/bootstrap.sh"