A script to update site periodically through CVSup(R)

• 本文约 75 字,阅读大致需要 1 分钟 | Development

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/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.