From fb4dbd6cbb27e8ef054283426f2fa098356c0a70 Mon Sep 17 00:00:00 2001 From: Nikolay Shaplov Date: Sun, 7 Jun 2026 15:09:44 +0000 Subject: [PATCH] Script for daily repost update by cron. (In case hooks does not work or not configured) --- scripts/update_all_repos.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/update_all_repos.sh 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 -- 2.47.3