summaryrefslogtreecommitdiff
path: root/bin/getanope
diff options
context:
space:
mode:
Diffstat (limited to 'bin/getanope')
-rwxr-xr-xbin/getanope42
1 files changed, 42 insertions, 0 deletions
diff --git a/bin/getanope b/bin/getanope
new file mode 100755
index 000000000..58f4c0dc7
--- /dev/null
+++ b/bin/getanope
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# $Id: getanope,v 1.2 2003/11/24 20:23:28 dane Exp $
+#
+
+MODULE="anope-dev"
+BRANCH=""
+
+if [ "$1" == "" ]; then
+ DST="$MODULE"
+else
+ DST="$1"
+fi
+
+let cnt="$(echo $CVSROOT | grep anope | wc -l)"
+if [ $cnt -eq 0 ]; then
+ echo "*** Environment variable CVSROOT is not set. Please set it"
+ echo "*** if you have a developer account with write access."
+ echo ""
+ echo "*** Assuming anonymous access. If prompted for a password,"
+ echo "*** just press RETURN to continue."
+ echo ""
+ export CVSROOT=":pserver:pubcvs@zero.org:/home/cvs/anope"
+
+ let login="$(grep "pubcvs@zero.org" ~/.cvspass 2> /dev/null | grep anope | wc -l)"
+
+ if [ $login -eq 0 ]; then
+ cvs -d$CVSROOT login
+ fi
+fi
+
+echo "Checking out $MODULE"
+
+if [ "$BRANCH" == "" ]; then
+ cvs -z3 -d$CVSROOT checkout -d$DST $MODULE
+else
+ cvs -z3 -d$CVSROOT checkout -r$BRANCH -d$DST $MODULE
+fi
+
+echo "*** All done!"
+
+exit 0