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
|
|
|
|
rm -r $NAME
|
|
|
|
fi
|
|
|
|
|
|
|
|
git clone --mirror $ORIG
|
|
|
|
cd $NAME
|
|
|
|
git push --mirror $DEST
|
|
|
|
cd ..
|
|
|
|
rm -r $NAME
|
|
|
|
|
2024-05-01 08:25:53 +00:00
|
|
|
echo "Done."
|
2024-05-01 08:21:28 +00:00
|
|
|
done <./repo-list
|