Host-deps installer and catalog hostname procedure

This commit is contained in:
George Lambert 2026-09-11 23:12:38 -04:00
commit 0031035048
21 changed files with 830 additions and 0 deletions

22
scripts/clone.sh Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Clone Forgejo modules listed in a repos file.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
GITSSH="${GITSSH:-ssh://git@git.georgelambert.org:2223/marchon}"
DEST="${VERAE_SRC:-$HOME/verae-src}"
LIST="${1:-$ROOT/repos.txt}"
export GIT_SSH_COMMAND="${GIT_SSH_COMMAND:-ssh -o StrictHostKeyChecking=accept-new -p 2223}"
mkdir -p "$DEST"
while read -r name; do
[[ -z "$name" || "$name" == \#* ]] && continue
if [[ -d "$DEST/$name/.git" ]]; then
echo "fetch $name"
git -C "$DEST/$name" fetch --prune origin
git -C "$DEST/$name" checkout -q main 2>/dev/null || git -C "$DEST/$name" checkout -q master
git -C "$DEST/$name" pull --ff-only || true
else
echo "clone $name"
git clone "$GITSSH/${name}.git" "$DEST/$name"
fi
done < "$LIST"
echo "cloned into $DEST"