No empty .Rs/.Re
[netbsd-mini2440.git] / sbin / mount_portal / examples / cvs.sh.sh
blob7a13161b7711b9a4c9161ecbe06e51780e46a3e1
1 #!/bin/sh
3 # $NetBSD: cvs.sh.sh,v 1.2 2003/07/12 23:02:59 atatat Exp $
5 # ensure that HOME is set for pserver modes
6 UID=`id -u`
7 export HOME=`awk -F: '$3=='"$UID"'{print$6}' /etc/passwd`
8 # supplement path to include ssh and cvs
9 export PATH=/usr/pkg/bin:$PATH
10 # use ssh instead of rsh for cvs connections
11 export CVS_RSH=ssh
13 case $1 in
14 netbsd)
15 export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot"
16 shift
18 freebsd)
19 export CVSROOT=":pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs"
20 shift
22 openbsd)
23 export CVSROOT="anoncvs@anoncvs.usa.openbsd.org:/cvs"
24 shift
27 echo "configuration not supported"
28 exit 0
29 esac
31 for 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=""
38 cvs co -p $rev $file
39 done