cvs.sh.sh revision 1.3
1#!/bin/sh 2 3# $NetBSD: cvs.sh.sh,v 1.3 2003/07/26 19:46:33 salo Exp $ 4 5# ensure that HOME is set for pserver modes 6UID=`id -u` 7export HOME=`awk -F: '$3=='"$UID"'{print$6}' /etc/passwd` 8# supplement path to include ssh and cvs 9export PATH=/usr/pkg/bin:$PATH 10# use ssh instead of rsh for cvs connections 11export CVS_RSH=ssh 12 13case $1 in 14 netbsd) 15 export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot" 16 shift 17 ;; 18 freebsd) 19 export CVSROOT=":pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs" 20 shift 21 ;; 22 openbsd) 23 export CVSROOT="anoncvs@anoncvs.usa.openbsd.org:/cvs" 24 shift 25 ;; 26 *) 27 echo "configuration not supported" 28 exit 0 29esac 30 31for file; do 32 if ( echo $file | egrep -qi '(.*),(-r)?([0-9\.]+|[-_a-z0-9]+)$' ); then 33 rev="-r`expr "$file" : '.*,\(.*\)' | sed 's/^-r//'`" 34 file="`expr "$file" : '\(.*\),.*'`" 35 else 36 rev="" 37 fi 38 cvs co -p $rev $file 39done 40