7.02.2010

Обновление всех репозиториев в папке

updater.sh:
#!/bin/sh

echo "Updating git repositories"
find . -type d -name ".git" -exec dirname {} \;|\
xargs realpath|\
while read i;
do
echo `basename $i`
cd "$i";
git pull;
done;

echo "Updating mercurial repositories"
find . -type d -name ".hg" -exec dirname {} \; |\
xargs realpath |\
while read i;
do
echo `basename $i`
cd "$i";
hg pull;
hg up -C;
done;

echo "Updating subversion repositories"
find . -maxdepth 2 -type d -name ".svn" -exec dirname {} \;| \
xargs realpath |\
while read i;
do
echo `basename $i`
cd "$i";
svn up;
done;

Комментариев нет: