gecko-dev/webtools/lxr/update-xref.sh

48 lines
1.1 KiB
Bash
Raw Normal View History

1998-06-12 19:41:29 +00:00
#!/bin/sh
# Run this from cron to update the identifier database that lxr uses
# to turn function names into clickable links.
# Created 12-Jun-98 by jwz.
# Updated 27-Feb-99 by endico. Added multiple tree support.
1998-06-12 19:41:29 +00:00
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
TREE=$1
export TREE
1998-06-12 19:41:29 +00:00
lxr_dir=.
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 19:41:29 +00:00
log=$db_dir/genxref.log
exec > $log 2>&1
set -x
1998-06-13 00:43:15 +00:00
date
1998-06-12 20:25:05 +00:00
lxr_dir=`pwd`
1998-06-12 19:41:29 +00:00
cd $db_dir/tmp
set -e
time $lxr_dir/genxref $src_dir
chmod -R a+r .
mv xref fileidx ../
1998-06-13 00:43:15 +00:00
date
uptime
1998-06-13 00:43:15 +00:00
1998-06-12 19:41:29 +00:00
exit 0