server

Server Configuration
git clone https://git.pngu.org/server
Log | Files | Refs | README

fetch_push.sh (436B)


#!/bin/bash

for dir in /home/jack/git_mirror/*; do
    if [ -d "$dir" ]; then
        cd $dir
        if [ -d "refs" ]; then
            /usr/bin/git fetch -p origin &> /dev/null
            if [ $? -ne 0 ]; then
                echo "$dir: fetch failed"
            fi
            /usr/bin/git push --mirror &> /dev/null
            if [ $? -ne 0 ]; then
                echo "$dir: push failed"
            fi
        fi
    fi
done