summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-05-09 04:41:52 +0000
committerNorbert Preining <preining@logic.at>2011-05-09 04:41:52 +0000
commitc2a3a55d41b6d05d442ebcabf8ff8dd556f6317c (patch)
tree5717702d7fac5af50b0bb61289d8af757536c586
parent3488d9037aebed77d59636fed49e865e019c23d3 (diff)
only allow upgrades within releases, and allow supplying --upgrade option
to the makeself script to upgrade an installation. git-svn-id: svn://tug.org/texlive/trunk@22367 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/tlpkg/bin/tl-makeself-from-tlnet24
1 files changed, 21 insertions, 3 deletions
diff --git a/Master/tlpkg/bin/tl-makeself-from-tlnet b/Master/tlpkg/bin/tl-makeself-from-tlnet
index f5ccbb0a83d..66eb9dc75b4 100755
--- a/Master/tlpkg/bin/tl-makeself-from-tlnet
+++ b/Master/tlpkg/bin/tl-makeself-from-tlnet
@@ -24,6 +24,8 @@ if test ! -d "$ARCHIVE"; then
exit 1
fi
+TLRELEASE=`grep '^depend release/' $TLNET/tlpkg/texlive.tlpdb | sed -e 's!^depend release/!!'`
+
cd $TMP
mkdir master
cd master
@@ -42,15 +44,31 @@ cd ..
# create the script which will be run on the user's machine to do the update.
#
-cat >runme.sh <<'END_RUNME'
+cat >runme.sh <<END_RUNME
#!/bin/sh
# Updater for tlmgr and infrastructure on Unix.
# Runs in unpacked archive directory.
+WORKINGRELEASE=$TLRELEASE
+
+END_RUNME
+
+cat >runme.sh <<'END_RUNME'
ROOT=`kpsewhich --var-value=SELFAUTOPARENT`
if test -r "$ROOT/tlpkg/texlive.tlpdb"; then
echo "$0: updating in $ROOT..."
-
+
+ tlmgrversion=`tlmgr version | grep '^TeX Live' | sed -e 's!^TeX Live (http://tug.org/texlive) version !!'`
+ echo "$0: found TeX Live $tlmgrversion"
+ if [ ! $WORKINGRELEASE = "$tlmgrversion" ] ; then
+ if [ "$1" = "--upgrade" ] ; then
+ echo "$0: upgrading from $tlmgrversion to $WORKINGRELEASE"
+ else
+ echo "$0: upgrading is not supported. target release is $WORKINGRELEASE"
+ exit 1
+ fi
+ fi
+
# move the architecture-specific files to the top level.
mv ./master/bin .
#mv ./master/tlpkg/installer .
@@ -94,7 +112,7 @@ $0: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
$0: Please call update-tlmgr-latest.sh --noexec --keep
$0: and then call the runme.sh script in the unpacked directory
$0: with the directory root as the first argument, something like:
-$0: sh runme.sh /path/to/your/texlive/installation/2008
+$0: sh runme.sh /path/to/your/texlive/installation/2010
END_ABORT_NODIR
exit 1
fi