Avoid cloning repositories every time.
Signed-off-by: Nicolás Ortega Froysa <nicolas@ortegas.org>
This commit is contained in:
parent
a5d1868b8c
commit
a44951bbd3
9
sync.sh
9
sync.sh
@ -15,14 +15,15 @@ do
|
|||||||
|
|
||||||
if [ -d "$NAME" ]
|
if [ -d "$NAME" ]
|
||||||
then
|
then
|
||||||
rm -r $NAME
|
cd $NAME
|
||||||
|
git remote update
|
||||||
|
else
|
||||||
|
git clone --mirror $ORIG
|
||||||
|
cd $NAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git clone --mirror $ORIG
|
|
||||||
cd $NAME
|
|
||||||
git push --mirror $DEST
|
git push --mirror $DEST
|
||||||
cd ..
|
cd ..
|
||||||
rm -r $NAME
|
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
done <./repo-list
|
done <./repo-list
|
||||||
|
Loading…
Reference in New Issue
Block a user