From a5ef7a57fcc4a397b3821e34b49c662871967ae7 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 12 Dec 2024 22:54:00 -0800 Subject: [PATCH] updated using git-extra --- todo | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/todo b/todo index f5f3b3c..81238c6 100644 --- a/todo +++ b/todo @@ -1,4 +1,5 @@ To Do: +-name -manifest -create script/program -args: [server, directory] @@ -6,5 +7,28 @@ To Do: -mirror all new repos -fetch all others -this will serve as backups of ia.org + +cat > /repos/fetch.sh << EOF +#!/usr/bin/env bash + +set -euo pipefail + +REPOS=(\$(cat ~/.repos)) +for REPO in "\${REPOS[@]}"; do + if [[ ! -d "\$REPO" ]]; then + git clone --mirror "$REMOTE\$REPO" \$REPO + echo "\$REPO" > "/repos/\$REPO/description" + cd "\$REPO" + git update-server-info + cd .. + else + cd "\$REPO" + git fetch --prune --prune-tags + git update-server-info + cd .. + fi +done +EOF + -tests -copy lots from git-extra -- 2.39.5