1998-06-12 19:41:29 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Run this from cron to update the source tree that lxr sees.
|
|
|
|
# Created 12-Jun-98 by jwz.
|
1999-03-10 22:58:57 +00:00
|
|
|
# Updated 27-Feb-99 by endico. Added multiple tree support.
|
1998-06-12 19:41:29 +00:00
|
|
|
|
|
|
|
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
|
|
export CVSROOT
|
|
|
|
|
1998-06-13 00:43:15 +00:00
|
|
|
PATH=/opt/local/bin:/opt/cvs-tools/bin:$PATH
|
1998-06-12 19:41:29 +00:00
|
|
|
export PATH
|
|
|
|
|
1999-03-10 22:58:57 +00:00
|
|
|
TREE=$1
|
|
|
|
export TREE
|
|
|
|
|
1998-06-12 19:41:29 +00:00
|
|
|
lxr_dir=.
|
1999-03-10 22:58:57 +00:00
|
|
|
db_dir=`sed -n 's@^dbdir:[ ]*\(.*\)@\1@p' < $lxr_dir/lxr.conf`/$TREE
|
|
|
|
|
|
|
|
if [ "$TREE" = '' ]
|
|
|
|
then
|
|
|
|
#since no tree is defined, assume sourceroot is defined the old way
|
|
|
|
#grab sourceroot from config file indexing only a single tree where
|
|
|
|
#format is "sourceroot: dirname"
|
|
|
|
src_dir=`sed -n 's@^sourceroot:[ ]*\(.*\)@\1@p' < $lxr_dir/lxr.conf`
|
|
|
|
|
|
|
|
else
|
|
|
|
#grab sourceroot from config file indexing multiple trees where
|
|
|
|
#format is "sourceroot: treename dirname"
|
|
|
|
src_dir=`sed -n 's@^sourceroot:[ ]*\(.*\)@\1@p' < $lxr_dir/lxr.conf | grep $TREE | sed -n "s@^$TREE \(.*\)@\1@p"`
|
|
|
|
fi
|
|
|
|
|
1998-06-12 22:03:28 +00:00
|
|
|
log=$db_dir/cvs.log
|
1998-06-12 19:41:29 +00:00
|
|
|
|
1998-06-12 22:03:28 +00:00
|
|
|
exec > $log 2>&1
|
|
|
|
set -x
|
|
|
|
|
1998-06-13 00:43:15 +00:00
|
|
|
date
|
|
|
|
|
1998-06-12 22:03:28 +00:00
|
|
|
# update the lxr sources
|
|
|
|
pwd
|
1998-06-13 01:12:23 +00:00
|
|
|
time cvs -d $CVSROOT update -dP
|
1998-06-13 00:45:02 +00:00
|
|
|
|
|
|
|
date
|
1998-06-12 22:03:28 +00:00
|
|
|
|
|
|
|
# then update the Mozilla sources
|
1998-06-12 19:41:29 +00:00
|
|
|
cd $src_dir
|
|
|
|
cd ..
|
1998-06-16 03:17:27 +00:00
|
|
|
|
1999-03-10 22:58:57 +00:00
|
|
|
# endico: check out the source
|
|
|
|
case "$1" in
|
|
|
|
|
|
|
|
'classic')
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P -rMozillaSourceClassic_19981026_BRANCH MozillaSource
|
|
|
|
;;
|
|
|
|
'ef')
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P mozilla/ef
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P mozilla/nsprpub
|
|
|
|
;;
|
|
|
|
'grendel')
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P Grendel
|
|
|
|
;;
|
|
|
|
'mailnews')
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P SeaMonkeyMailNews
|
|
|
|
;;
|
|
|
|
'mozilla')
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P mozilla
|
|
|
|
;;
|
|
|
|
'nspr')
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P NSPR
|
|
|
|
;;
|
|
|
|
'seamonkey')
|
|
|
|
time cvs -Q -d $CVSROOT checkout -P SeaMonkeyAll
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1998-06-12 22:03:28 +00:00
|
|
|
|
1998-06-13 00:43:15 +00:00
|
|
|
date
|
1999-03-10 22:58:57 +00:00
|
|
|
uptime
|
1998-06-13 00:43:15 +00:00
|
|
|
|
1998-06-12 19:41:29 +00:00
|
|
|
exit 0
|