#! /bin/sh
#$Header: /usr/groups/linux/xen/vm-configs/RCS/SAVE,v 1.1 2007/01/14 16:55:27 pb22 Exp $
#
# Archive xen machine configs
#

src=/etc/xen/auto
dst=/usr/groups/linux/xen/vm-configs

for f in `test -d $src && find $src -type f`; do
	case "$h" in '') h=`(uname -n || hostname) | sed 's/\..*//'`;; esac

	F=`echo $f | sed 's=.*/=='`
	case "$F" in "$h-"*) d="$F";; *) d="$h-$F";; esac

	co -l -q $dst/$d
	copy -t $f $dst/$d
	rcsdiff $dst/$d
	ci -u -q -m"auto copy" $dst/$d
done
