summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlcritical
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-02-03 18:50:56 +0000
committerKarl Berry <karl@freefriends.org>2009-02-03 18:50:56 +0000
commit381ceb943399bebbc3740527572629768291d709 (patch)
treea5c2381530ca3d4bf41a11460d8bf2e6a37070fd /Master/tlpkg/bin/tl-update-tlcritical
parentdf31f1eaa2656e65e57d1172db4cef95ac383e12 (diff)
(do_updater): new fn, and make sha256sums.
git-svn-id: svn://tug.org/texlive/trunk@12067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-tlcritical')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlcritical41
1 files changed, 30 insertions, 11 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlcritical b/Master/tlpkg/bin/tl-update-tlcritical
index d5dfcadda62..aa88d91815f 100755
--- a/Master/tlpkg/bin/tl-update-tlcritical
+++ b/Master/tlpkg/bin/tl-update-tlcritical
@@ -5,28 +5,47 @@
# packages. Also listed in tl-update-containers, unfortunately.
mydir=`cd \`dirname $0\` && pwd`
-Master=`cd $mydir/../.. && pwd`
+PATH=$mydir:/usr/local/gnu/bin:/usr/local/bin:$PATH # sha256sum+makensis on tug
cd ${TMPDIR-/tmp}
tlcrit=/home/ftp/texlive/tlcritical
+# function to update one of recovery scripts (sh or exe) in tlcritical.
+#
+do_updater ()
+{
+ type=$1 # sh or exe
+ newfile=`ls update-*.$type`
+ if test -z "$newfile"; then
+ echo "$0: no new file update-*.$type in `pwd`" >&2
+ exit 1
+ fi
+ rm -f $tlcrit/update-*.$type* # rm old file and checksum
+ mv $newfile $tlcrit # move new file
+ #
+ # make checksum for new file
+ (cd $tlcrit && sha256sum $newfile >$newfile.sha256)
+ #
+ # link to generic names
+ (cd $tlcrit && ln -s $newfile update-tlmgr-latest.$type)
+ (cd $tlcrit && ln -s $newfile.sha256 update-tlmgr-latest.$type.sha256)
+}
+
# update normal containers.
echo "$0: running tl-update-containers (for critical packages)..."
-$mydir/tl-update-containers \
- -location $tlcrit -all \
+tl-update-containers -location $tlcrit -all \
00texlive-installation.config 00texlive.config bin-texlive texlive.infra
# update Unix disaster recovery.
echo "$0: running tl-makeself-from-tlnet..."
-$mydir/tl-makeself-from-tlnet $tlcrit
-rm -f $tlcrit/update-*.sh
-mv update-*.sh $tlcrit
-(cd $tlcrit && ln -sv update-*.sh update-tlmgr-latest.sh)
+tl-makeself-from-tlnet $tlcrit
+do_updater sh
# update the Windows updater executable.
echo "$0: running tl-update-nsis..."
-$mydir/tl-update-nsis >/tmp/updater.nsi
+tl-update-nsis >/tmp/updater.nsi
makensis /tmp/updater.nsi >/tmp/makensis.log
-rm -f $tlcrit/update-*.exe /tmp/updater.nsi
-mv update-*.exe $tlcrit
-(cd $tlcrit && ln -sv update-*.exe update-tlmgr-latest.exe)
+rm -f /tmp/updater.nsi
+do_updater exe
+
+ls -lt $tlcrit