#!/bin/sh # Updates all CVS checkouts in subdirectories of a top-level source directory. # # Usage: update-modules if [ -e /etc/init.d/functions.sh ]; then source /etc/init.d/functions.sh else ebegin() { echo -n " * $1 ... " } eend() { if [ "$1" -eq 0 ]; then echo "[ OK ]" else echo "[ !! ]" fi } fi for i in *; do if [ -d "$i" -a -d "${i}/CVS" ]; then ebegin "Updating $i" pushd $i > /dev/null 2>&1 cvs up > ${i}.log 2>&1 retval=$? if [ "$retval" -eq 0 ]; then rm ${i}.log fi popd > /dev/null 2>&1 eend $retval fi done # git updates for i in xcb xserver libX11 xf86-video-nv xf86-video-intel; do ebegin "Updating $i" pushd $i > /dev/null 2>&1 git pull . > ${i//\//-}.log 2>&1 retval=$? if [ "$retval" -eq 0 ]; then rm ${i//\//-}.log fi popd > /dev/null 2>&1 eend $retval done