summaryrefslogtreecommitdiff
path: root/Build/tools/tlrebuild
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-02-13 00:49:47 +0000
committerKarl Berry <karl@freefriends.org>2006-02-13 00:49:47 +0000
commit045f872c421bb96d9e680ccd7f79c823cef10521 (patch)
tree20483574ec8846ce1adb25e905f4a0b4e2505a41 /Build/tools/tlrebuild
parenta1e47d103e66e2a947105dd7378e8df3918c3f62 (diff)
move Master/Tools to Build/tools
git-svn-id: svn://tug.org/texlive/trunk@1514 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/tools/tlrebuild')
-rwxr-xr-xBuild/tools/tlrebuild126
1 files changed, 126 insertions, 0 deletions
diff --git a/Build/tools/tlrebuild b/Build/tools/tlrebuild
new file mode 100755
index 00000000000..e44831a78e7
--- /dev/null
+++ b/Build/tools/tlrebuild
@@ -0,0 +1,126 @@
+#!/bin/sh
+# $Id$
+# 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
+ shift
+else
+ no_tpm=false
+fi
+#
+if test x$1 = x--no-images; then
+ no_images=true
+ shift
+else
+ no_images=false
+fi
+#
+if test x$1 = x--no-test; then
+ no_test=true
+ shift
+else
+ no_test=false
+fi
+
+message() \
+{
+ printf "\f\n`date` $0: $*...\n"
+}
+
+# don't work with old stuff.
+master=`cd $tools/.. && pwd`
+top=`cd $master/.. && pwd`
+message "svn update"
+(cd $top && svn update) || 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
+
+for dir in texmf/tpm texmf-dist/tpm texmf-doc/tpm; do
+ cd $master/$dir || exit 1
+ message "$dir: finding changed tpms"
+ for f in "$@"; do
+ diff="`svn --diff-cmd=diff -x -u0 diff $f`"
+ diff_without_date=`echo "$diff" | egrep -v '^[-+=@]{2,3}|TPM:Date|^Index'`
+ if test -z "$diff"; then
+ svn revert $f
+ elif test -z "$diff_without_date"; then
+ # checking to see if this ever happens; the date should be stable?
+ echo "$f diff only in date, reverted: $diff"
+ svn revert $f
+ else
+ echo " $f diff:"
+ echo "$diff"
+ fi
+ done
+
+# # new tpms not in depot xx must svn add/remove somehow
+# 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
+
+ svn commit -m'tlrebuild [tpm] autoupdate'
+
+ # keep writable for next time, trying to have rahtz/staw share /home/tlprod.
+ chmod a+rw * >&/dev/null
+done
+
+# lists files used by the Unix installer.
+message "update-lists for Unix installer"
+update-lists || exit 1
+
+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