From 7a24ee7b942cfb4d3a19fcd4e7d8c33de11a3a6e Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Sat, 6 Apr 2013 16:01:11 +0200 Subject: [PATCH] Utils to retrieve NetBSD sources --- .gitignore | 1 + netbsd-cvs.sh | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .gitignore create mode 100755 netbsd-cvs.sh 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 -