From e6faeef3e4205722d36bbbb86b3b3390ab6527be Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 28 Dec 2005 00:04:28 +0000 Subject: trunk git-svn-id: svn://tug.org/texlive/trunk@5 c570f23f-e606-0410-a88d-b1316a301751 --- Master/Tools/update-lsr | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 Master/Tools/update-lsr (limited to 'Master/Tools/update-lsr') diff --git a/Master/Tools/update-lsr b/Master/Tools/update-lsr new file mode 100755 index 00000000000..6e85c9bc101 --- /dev/null +++ b/Master/Tools/update-lsr @@ -0,0 +1,42 @@ +#!/bin/sh +# $Id: //depot/Master/Tools/update-lsr#1 $ $Date: 2005/06/28 $ $Author: karl $ +# Originally written 2004, Karl Berry. Public domain. +# +# Update ls-R files. Called from tlrebuild and also karl's cron. + +mydir=`dirname $0` +tools=`cd $mydir && pwd` +PATH=$tools:$PATH; export PATH +umask 0 + +master=`cd $mydir/.. && pwd` + +# save current. +cd $master || exit 1 +for f in texmf*/ls-R; do + rm -f $f.save + cp $f $f.save +done +# +# generate new. +p4 edit texmf*/ls-R +./bin/i386-linux/mktexlsr +# +for f in texmf*/ls-R; do + test $f = texmf-var/ls-R && continue # not checked in + if cmp -s $f.save $f; then + # no change, back to current. + p4 revert $f + else + : # update needed, will happen next. + fi + # + rm -f $f.save +done + +# if we have any files, submit to perforce (frightening but necessary). +if p4 change -o | grep '^Files:' >/dev/null; then + p4 change -o \ + | sed "s!!regenerated by $0!" \ + | p4 submit -i +fi -- cgit v1.2.3