cgit-dockerized/update-mirrors.sh
Billy Brawner 3d646b4e68 Initial commit
Signed-off-by: Billy Brawner <billy@wbrawner.com>
2019-12-22 15:00:24 -06:00

14 lines
327 B
Bash
Executable file

#!/usr/bin/env sh
REPO_DIR="/pub/git"
for repo in $(find /pub/git -maxdepth 2 -type d -iname '*.git'); do
(cd $repo
git config --get remote.origin.mirror > /dev/null
if [ $? -eq 0 ]; then
echo "Updating mirror at $repo"
git remote update > /dev/null
fi)
done