From: Nikolay Shaplov Date: Sun, 7 Jun 2026 15:09:44 +0000 (+0000) Subject: Script for daily repost update by cron. (In case hooks does not work or not configured) X-Git-Url: http://gitweb.nataraj.world/?a=commitdiff_plain;h=fb4dbd6cbb27e8ef054283426f2fa098356c0a70;p=git4ai.git Script for daily repost update by cron. (In case hooks does not work or not configured) --- diff --git a/scripts/update_all_repos.sh b/scripts/update_all_repos.sh new file mode 100755 index 0000000..ce5fcd0 --- /dev/null +++ b/scripts/update_all_repos.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +source "${BASH_SOURCE%/*}"/config._sh + +if [ -z "$GIT_CLONE_PATH" ]; then + echo "GIT_CLONE_PATH is not set" >&2 + exit 1 +fi + +if [ ! -d "$GIT_CLONE_PATH" ]; then + echo "Directory $GIT_CLONE_PATH does not exist" >&2 + exit 1 +fi + +for repo in "$GIT_CLONE_PATH"/*/; do + [ -d "$repo" ] || continue + GIT_REPO=$(basename "$repo") \ + "${BASH_SOURCE%/*}"/update_repo.sh +done