vn-docker/redmine/update-repositories.sh

11 lines
266 B
Bash
Executable File

#!/bin/bash
GIT_SYNC_FOLDER="/var/local/redmine/repositories"
for REPO_DIR in "$GIT_SYNC_FOLDER/"*; do
if [ -d "$REPO_DIR" ] && [[ "$REPO_DIR" =~ ^.+\.git$ ]]; then
echo "Fetching $REPO_DIR"
(cd "$REPO_DIR" && git remote update --prune) >> /dev/null
fi
done