24 lines
303 B
Bash
24 lines
303 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
while read line
|
||
|
do
|
||
|
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
|
||
|
|
||
|
"Done."
|
||
|
done <./repo-list
|