delphij's Chaos

选择chaos这个词是因为~~实在很难找到一个更合适的词来形容这儿了……

03 Oct 2004

A script to update site periodically through CVSup(R)

The script I am using for updating my own website(s) is not quite complex, it is here:

#!/bin/sh
# Detect and update the files
#
# $Phantasm$

CVSROOT="/home/ncvs"
SUPFILE="/home/delphij/cvsup/supfile-delphijweb"
LOCKFILE="/home/delphij/cvsup/cvsup-lock"

if [ -f ${CVSROOT}/CVSROOT/commitlogs/have_updates ]
then
	rm ${CVSROOT}/CVSROOT/commitlogs/have_updates
	cvsup -1gL 2 ${SUPFILE}
fi

Of course you need some CVSROOT scripts to get it work, but the idea is not too complex.