summaryrefslogtreecommitdiff
path: root/Master/Tools/update-lsr
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2005-12-28 00:04:28 +0000
committerKarl Berry <karl@freefriends.org>2005-12-28 00:04:28 +0000
commite6faeef3e4205722d36bbbb86b3b3390ab6527be (patch)
treeb6bf2abd8e881f40beaca430df2e1c34c02c19ab /Master/Tools/update-lsr
parent577983747d8680b8defbfdd03a9d50bad6fd54b7 (diff)
trunk
git-svn-id: svn://tug.org/texlive/trunk@5 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/Tools/update-lsr')
-rwxr-xr-xMaster/Tools/update-lsr42
1 files changed, 42 insertions, 0 deletions
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!<enter description here>!regenerated by $0!" \
+ | p4 submit -i
+fi