commit 7a24ee7b942cfb4d3a19fcd4e7d8c33de11a3a6e Author: Lionel Sambuc Date: Sat Apr 6 16:01:11 2013 +0200 Utils to retrieve NetBSD sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..7ac83b287f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +CVS diff --git a/netbsd-cvs.sh b/netbsd-cvs.sh new file mode 100755 index 0000000000..0505336189 --- /dev/null +++ b/netbsd-cvs.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# Invocation of this script : +# $ ./netbsd-cvs.sh checkout -A -P -D "2012/10/17 12:00:00 UTC" src -d . +# $ ROOT=/some/path ./netbsd-cvs.sh checkout -A -P -D "2012/10/17 12:00:00 UTC" src -d . +# $ NETBSD_SRC=/some/absolute/path ./netbsd-cvs.sh checkout -A -P -D "2012/10/17 12:00:00 UTC" src -d . + +: ${ROOT=.} +: ${NETBSD_SRC=${ROOT}/netbsd} + +if [ "$#" -lt "1" ]; then + echo "Wrong number of arguments." + exit 1 +fi + +if [ ! -d ${NETBSD_SRC} ]; then + echo "CVS Root dir does not exist or is not a directory : ${NETBSD_SRC}" + exit 2 +fi + +cd ${NETBSD_SRC} +export CVS_RSH="ssh" +export CVSROOT="anoncvs@anoncvs.netbsd.org:/cvsroot" +cvs "$@" +cd -