summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-15 22:59:41 +0000
committerKarl Berry <karl@freefriends.org>2016-04-15 22:59:41 +0000
commit092d3631df923d75af27fc722762379e14afc3e9 (patch)
tree99d30ebb34833d9422e3aa57e4671c8642a12371
parent0dd1263a6fbad8b5627bc51fba85e1a3bd146ca5 (diff)
(do_updater): --batch for gpg; don't use subshells
so we abort on failure; check that target files exist and are non-empty. git-svn-id: svn://tug.org/texlive/trunk@40541 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlcritical34
1 files changed, 23 insertions, 11 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlcritical b/Master/tlpkg/bin/tl-update-tlcritical
index c6052e89f48..099fa395b6c 100755
--- a/Master/tlpkg/bin/tl-update-tlcritical
+++ b/Master/tlpkg/bin/tl-update-tlcritical
@@ -43,21 +43,33 @@ do_updater ()
rm -f $tlcrit/update-*.$type* # rm old file and checksum
mv $newfile $tlcrit # move new file
#
- # make checksum for new file
- (cd $tlcrit && sha512sum $newfile >$newfile.sha512)
- (cd $tlcrit && gpg --homedir /home/texlive/.gnupg \
- --passphrase-file /home/texlive/.gnupg/passphrase \
- --armor --detach-sign --local-user 0x06BAB6BC $newfile.sha512)
+ # do rest in $tlcrit so we don't just exit from a subshell on failure.
+ origdir=`pwd`
+ cd $tlcrit
#
- # link to generic names
- (cd $tlcrit && ln -s $newfile update-tlmgr-latest.$type)
- (cd $tlcrit && ln -s $newfile.sha512 update-tlmgr-latest.$type.sha512)
- (cd $tlcrit && ln -s $newfile.sha512.asc update-tlmgr-latest.$type.sha512.asc)
+ # make checksum for new file:
+ sha512sum $newfile >$newfile.sha512
+ # sign it:
+ gpg --batch --homedir /home/texlive/.gnupg \
+ --passphrase-file /home/texlive/.gnupg/passphrase \
+ --armor --detach-sign --local-user 0x06BAB6BC $newfile.sha512
+ #
+ # create the generic names as symlinks. target files must be nonempty.
+ test -s $newfile \
+ && ln -s $newfile update-tlmgr-latest.$type
+ #
+ test -s $newfile.sha512 \
+ && ln -s $newfile.sha512 update-tlmgr-latest.$type.sha512
+ #
+ test -s $newfile.sha512.asc \
+ && ln -s $newfile.sha512.asc update-tlmgr-latest.$type.sha512.asc
+ #
+ cd $origdir
}
# additionally disabled packages
-moredis=`grep -v '^\s*#' $master/tlpkg/dev/tlnet-disabled-packages.txt | \
- sed -e 's/\s*$//'`
+moredis=`grep -v '^\s*#' $master/tlpkg/dev/tlnet-disabled-packages.txt \
+ | sed -e 's/\s*$//'`
echo "$0: additional packages from via tlnet-disabled-packages.txt: $moredis"
if test -n "$recreate"; then