diff options
author | Karl Berry <karl@freefriends.org> | 2021-04-30 15:34:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-04-30 15:34:01 +0000 |
commit | 510c61fbfa6454db89adf44b23014b13adadc46f (patch) | |
tree | 6148817933238eb4c2c5d906c95fcab51abde825 /Master/tlpkg | |
parent | 9281fc163a7be73887b255244b5be50ebca9960c (diff) |
(trap): restore original release-texlive.txt on exit;
eliminate unused --master option for simplicity.
git-svn-id: svn://tug.org/texlive/trunk@59031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-images | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/Master/tlpkg/bin/tl-update-images b/Master/tlpkg/bin/tl-update-images index 72b2c8b2c33..08c84a601e3 100755 --- a/Master/tlpkg/bin/tl-update-images +++ b/Master/tlpkg/bin/tl-update-images @@ -17,10 +17,6 @@ LC_ALL=C; export LC_ALL unset CDPATH # avoid output from cd umask 022 -lockfile=/dev/shm/cron.tlimg.lock # so it'll go away on reboot -lockfile -r 0 $lockfile || exit 1 # from procmail -trap "rm -f $lockfile; exit 0;" 0 1 2 15 - NAME=texlive V=2021 D=`date +%Y%m%d` @@ -34,6 +30,20 @@ cd $mydir || exit 1 # the Master/tlpkg/bin directory master=`cd ../.. && /bin/pwd` test -z "$master" && exit 1 +lockfile=/dev/shm/cron.tlimg.lock # so it'll go away on reboot +lockfile -r 0 $lockfile || exit 1 # from procmail +# +release_savefile=/tmp/tluirt.txt +release_livefile=$master/release-texlive.txt +# +# On exit, remove the lockfile and undo the release-texlive.txt without +# using svn. +# +trap "set -x; rm -f $lockfile; \ + test -s $release_savefile && cp $release_savefile $release_livefile; \ + rm -f $release_savefile +exit 0;" 0 1 2 15 + debug=${OVERRIDE_DEBUG-false} mkisofs="xorriso -read_mkisofsrc -as mkisofs" # mkisofs makeinst=true @@ -49,8 +59,7 @@ quiet= # for passing to mkisofs while test $# -gt 0; do case $1 in --debug) debug=true; quiet=;; - --help) echo "$0: No help, use the source, sorry."; exit 0;; - --master=*) master=`echo $1 | sed 's/.*=//'`;; + --help) echo "$0: Helpless, use the source, sorry."; exit 0;; --mkisofs=*) mkisofs=`echo $1 | sed 's/.*=//'`;; --noinst) makeinst=false;; --notar) maketar=false;; @@ -305,16 +314,13 @@ MAKETAR () # Add our exact version to the release file. Ensure a line of its own, # although a blank line should already be there. -rm -f /tmp/tluirt.txt -cp $master/release-texlive.txt /tmp/tluirt.txt -printf "\ntexlive-$D\n" >>$master/release-texlive.txt +rm -f $release_savefile +cp $release_livefile $release_savefile +printf "\ntexlive-$D\n" >>$release_livefile $makeinst && MAKEINST $maketar && MAKETAR -# Undo the version without using svn, in case it's been relocked. -cp /tmp/tluirt.txt $master/release-texlive.txt - exit 0 # Until 2010, we also produced: |