Auto sincronizar repositórios do github ou bitbucket

Recentemente vi alguns projetos opensource simplesmente serem removidos ou passaram a ser pagos, e alguns pegam a gente de surpresa, então pensei em algo para auto sincronizar alguns repositórios para garantir que terei a última versão.

O código é relativamente simples:

 
#!/bin/bash
if [ ! -z "$1" ]; then
if [ -d $1 ] && [ $1 != "." ]; then
cd "$1"
pwd
git pull
fi
exit 0
fi

file=$0
start=$(echo ${0} | cut -c1-1)
if [ "$start" != "." ] && [ "$start" != "/" ]; then
file="./$0"
fi
find -maxdepth 1 -exec "$file" {} \;

exit 0;

Se você quer entender melhor o código e porque ele foi criado, assista ao vídeo