2024-05-01 08:21:28 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
while read line
|
|
|
|
do
|
2024-05-01 08:37:20 +00:00
|
|
|
if [[ -z "$line" || "$line" == "#"* ]]
|
|
|
|
then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2024-05-01 08:21:28 +00:00
|
|
|
ORIG=$(echo $line | cut -d ';' -f1)
|
|
|
|
DEST=$(echo $line | cut -d ';' -f2)
|
|
|
|
NAME=${ORIG##*/}
|
|
|
|
|
|
|
|
echo "Mirroring $NAME"
|
|
|
|
|
|
|
|
if [ -d "$NAME" ]
|
|
|
|
then
|
2024-05-01 08:54:26 +00:00
|
|
|
cd $NAME
|
|
|
|
git remote update
|
|
|
|
else
|
|
|
|
git clone --mirror $ORIG
|
|
|
|
cd $NAME
|
2024-05-01 08:21:28 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
git push --mirror $DEST
|
|
|
|
cd ..
|
|
|
|
|
2024-05-01 08:25:53 +00:00
|
|
|
echo "Done."
|
2024-05-01 08:21:28 +00:00
|
|
|
done <./repo-list
|