call-cvsup
Dieses Script laeuft bei uns per cronjob in der Nacht und aktualisiert automatisch die Ports (/usr/ports), anschliessend erstellt es eine Liste der zu aktualisierenden Programme
Der Code
PATH=/usr/local/bin:/usr/sbin:$PATH
DATE=`date +%Y%m%d`
cd /root/cvsup
find . -name cvsup.ports.\* -mtime +7 | xargs rm --
# stable erstmal rausgenommen, wird nur bei Bedarf upgedatet.
# for i in stable ports ; do
for i in ports ; do
# for i in stable ; do
# do not run in the background, make-world waits for it
cvsup -g -L 2 ${i}-supfile >> cvsup.$i.$DATE.log 2>&1
done
cd /root && touch pkg_version.out && pkg_version -v | fgrep -v up-to-date > pkg_version.out
- Bei mir sieht die Schleife anders aus:
for i in "$@"; do test -f "$i-supfile" && cvsup -g -L 2 "${i}"-supfile >> cvsup."$i"."$DATE".log 2>&1 doneVorteil: ich kann die supfiles an der Kommandozeile mit angeben:/root/bin/call-cvsup ports stable oder /root/bin/call-cvsup 4.8-RELEASE etc. -- DaTa 2003-07-23 11:09:43

