summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorRob Holland <tigger@gentoo.org>2004-01-20 23:25:48 +0000
committerRob Holland <tigger@gentoo.org>2004-01-20 23:25:48 +0000
commit349dd995e865627893b478600feb2634f6ccf368 (patch)
treea07f3c3de8f388b8bd7714bcaa823bb22976c4bc /admin
parentFixed a little typo... (diff)
downloadgentoo-349dd995e865627893b478600feb2634f6ccf368.tar.gz
gentoo-349dd995e865627893b478600feb2634f6ccf368.tar.bz2
gentoo-349dd995e865627893b478600feb2634f6ccf368.zip
tidy a little and change to read from cvs tree but write to clean web dir
Diffstat (limited to 'admin')
-rw-r--r--admin/www.gentoo.org/scripts/cvs-page.sh36
1 files changed, 17 insertions, 19 deletions
diff --git a/admin/www.gentoo.org/scripts/cvs-page.sh b/admin/www.gentoo.org/scripts/cvs-page.sh
index 116e8d4baf..79b1318dce 100644
--- a/admin/www.gentoo.org/scripts/cvs-page.sh
+++ b/admin/www.gentoo.org/scripts/cvs-page.sh
@@ -1,23 +1,21 @@
#!/bin/bash
-XSLTP=xsltproc
-OUTLOG=/tmp/clog
+
source ~/.bashrc
-source ~/.keychain/`hostname`-sh
-export CVS_RSH=ssh
-[ -z "${WEBROOT}" ] && echo "\$WEBROOT not set; exiting" && exit 1
-[ -z "${WEBSCRIPTS}" ] && echo "\$WEBSCRIPTS not set; exiting" && exit 1
+XSLTPROC=xsltproc
+OUTLOG=/tmp/clog
+
+if [ -d "${CVS_DOCROOT}" -a -d "${WEB_DOCROOT}" ]; then
+ yesterday=`date -d "1 day ago 00:00" -R`
+ today=`date -d "00:00" -R`
+ cvsdate=-d\'${yesterday}\<${today}\'
+ nicedate=`date -d yesterday +"%d %b %Y %Z (%z)"`
-cd ~/gentoo-x86
-echo ">>> Updating cvs..."
-cvs -z0 -q update -dP
-yesterday=`date -d "1 day ago 00:00" -R`
-today=`date -d "00:00" -R`
-cvsdate=-d\'${yesterday}\<${today}\'
-nicedate=`date -d yesterday +"%d %b %Y %Z (%z)"`
-echo ">>> Generating cvs log..."
-${WEBSCRIPTS}/cvs2cl.pl --xml -f $OUTLOG -l "${cvsdate}" 2> /dev/null
-/usr/bin/sed -e 's/xmlns=".*"//' $OUTLOG > ${OUTLOG}.2
-install -d ${WEBROOT}/dyn
-$XSLTP ${WEBROOT}/xsl/cvs.xsl ${OUTLOG}.2 > ${WEBROOT}/dyn/index-cvs.xml
-echo ">>> Done :)"
+ cd ${CVS_GENTOO_ROOT}/gentoo-x86
+ ${CVS_WEB_SCRIPTS}/cvs2cl.pl --xml -f $OUTLOG -l "${cvsdate}" 2> /dev/null
+ /usr/bin/sed -e 's/xmlns=".*"//' $OUTLOG > ${OUTLOG}.2
+ $XSLTP ${CVS_DOCROOT}/xsl/cvs.xsl ${OUTLOG}.2 > ${WEB_DOCROOT}/dyn/index-cvs.xml
+else
+ echo "CVS_DOCROOT and/or WEB_DOCROOT were not set or were not directories" >&2
+ exit 1
+fi