diff --git a/repo_watcher.sh b/repo_watcher.sh index 3965cf2..d6c0feb 100644 --- a/repo_watcher.sh +++ b/repo_watcher.sh @@ -5,6 +5,9 @@ process_repo() { FULL_REPO_URL=$1 DESTINATION=$2 + # Ensure The Repo is marked as Safe by Git + git config --global --add safe.directory /root/Repo_Cache/docs + # Extract the URL without credentials for logging and notifications CLEAN_REPO_URL=$(echo "$FULL_REPO_URL" | sed 's/https:\/\/[^@]*@/https:\/\//') @@ -34,6 +37,7 @@ process_repo() { # Main loop while true; do + # Iterate over each environment variable matching 'REPO_[0-9]+' env | grep '^REPO_[0-9]\+=' | while IFS='=' read -r name value; do # Split the value by comma and read into separate variables