summaryrefslogtreecommitdiff
path: root/Master/Tools/tlrebuild
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/tlrebuild
parent577983747d8680b8defbfdd03a9d50bad6fd54b7 (diff)
trunk
git-svn-id: svn://tug.org/texlive/trunk@5 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/Tools/tlrebuild')
-rwxr-xr-xMaster/Tools/tlrebuild133
1 files changed, 133 insertions, 0 deletions
diff --git a/Master/Tools/tlrebuild b/Master/Tools/tlrebuild
new file mode 100755
index 00000000000..98e9a57b4fd
--- /dev/null
+++ b/Master/Tools/tlrebuild
@@ -0,0 +1,133 @@
+#!/bin/sh
+# $Id: //depot/Master/Tools/tlrebuild#19 $ $Date: 2005/10/19 $ $Author: karl $
+# Originally written 2004, Karl Berry. Public domain.
+#
+# Rebuild the TeX Live distribution -- no actual recompilation of
+# sources (run bash Build.sh for that), but all the infrastructure files.
+
+mydir=`dirname $0`
+tools=`cd $mydir && pwd`
+PATH=$tools:$PATH; export PATH
+umask 0
+
+if test x$1 = x--no-tpm; then
+ no_tpm=true
+else
+ no_tpm=false
+fi
+#
+if test x$1 = x--no-images; then
+ no_images=true
+else
+ no_images=false
+fi
+#
+if test x$1 = x--no-test; then
+ no_test=true
+else
+ no_test=false
+fi
+
+message() \
+{
+ printf "\f\n`date` $0: $*...\n"
+}
+
+# don't work with old stuff.
+message "p4 sync"
+p4 sync || exit 1
+
+if $no_tpm; then :; else
+# have to run multiple times to make the sizes converge, since the .tpm
+# file is itself one of the files in the package.
+# Fabrice says four times is the magic number.
+message "update-tpm regeneration #1"
+(update-tpm
+message "#2"
+ update-tpm
+message "#3"
+ update-tpm
+message "#4"
+ update-tpm || exit 1) | grep -v '^Writing '
+
+# sanity check of tpms, hopefully nothing to report after the update.
+message "tpm-check"
+tpm-check || exit 1
+
+master=`cd $mydir/.. && pwd`
+for dir in texmf/tpm texmf-dist/tpm texmf-doc/tpm; do
+ cd $master/$dir || exit 1
+ message "$dir: finding changed tpms"
+ changelist=`p4 diff -se ...`
+ if test -n "$changelist"; then
+ echo "$changelist" | p4 -x - edit 2>&1 | grep -v 'opened for edit'
+ for f in $changelist; do
+#echo "checking $f for unimportant change..."
+ # revert tpms that differ only in the date.
+ diff="`p4 diff $f \
+ | egrep -v '^===|^---|^[0-9]+c[0-9]|TPM:Date' 2>/dev/null`"
+ if test -z "$diff"; then
+ p4 revert $f 2>&1 | grep -v 'was edit'
+ else
+ echo $f diff: $diff
+ fi
+ done
+ fi
+
+ # new tpms not in depot
+ message "$dir: finding new tpms"
+ find . -type f | p4 -x - add 2>&1 \
+ | egrep -v 'already opened|add.*existing file'
+
+ message "$dir: finding obsolete tpms"
+ p4 diff -sd ... | p4 -x - delete # old tpms no longer needed
+done
+
+# lists files used by the Unix installer.
+message "update-lists for Unix installer"
+update-lists || exit 1
+
+
+#
+# if we have any files, submit to perforce (frightening but necessary).
+if p4 change -o | grep '^Files:' >/dev/null; then
+ message "submitting to p4"
+ p4 change -o \
+ | sed "s!<enter description here>!regenerated by $0!" \
+ | p4 submit -i
+else
+ message "no changes to submit to p4"
+fi
+
+# keep writable for next time, trying to have rahtz/staw share /home/tlprod.
+chmod a+rw $master/*/tpm/* >&/dev/null
+
+message "ls-R updates"
+update-lsr
+
+fi # end no-tpm
+
+#
+$no_images && exit 0
+
+message "making ISO images"
+MakeImages.sh --debug --target=/home/ftp/texlive/Images/test
+
+
+$no_test && exit 0
+
+message "doing test installation"
+instdir=/home/ftp/texlive/Contents/testinstalled
+rm -rf $instdir
+
+cd $master || exit
+# D/1/$instdir/R -- target directory
+# I -- do installation
+time nice sh ./install-live.sh <<EOF
+D
+1
+$instdir
+R
+I
+EOF
+chmod -R a+rwX $instdir