for hg_dir in $(find -maxdepth 2 -type d -name ".hg")
do
folder="$(dirname "$hg_dir")";
cd $folder && \
echo "Updating ${folder} ..." &&\
hg pull -u && \
cd -;
done
The use of && makes sure that updates will be run only if the directory change takes place.
The same works with git. Just change ".hg" with ".git" and hg pull -u with git pull
Did you know about the Octave Forge "super" repository? Maybe a similar approach would be useful for you too. http://hg.code.sf.net/p/octave/octave-forge
ResponderEliminar