diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/tlpkg/libexec/mptopdf-extract | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Master/tlpkg/libexec/mptopdf-extract b/Master/tlpkg/libexec/mptopdf-extract index 90d6d126c60..33a2a162439 100755 --- a/Master/tlpkg/libexec/mptopdf-extract +++ b/Master/tlpkg/libexec/mptopdf-extract @@ -1,5 +1,6 @@ #!/bin/sh # $Id$ +# Public domain. Originally written by Karl Berry, 2013. # Get the mptopdf files out of the context zip. We distribute mptopdf # as a separate package, since it can be used with LaTeX. See # description in mptopdf.tlpsrc for details. @@ -26,9 +27,18 @@ fi # Working directory. workdir=/home/ftp/tex/mptopdf -cd $workdir || exit 1 -rm -rf $workdir.prev -mkdir $workdir.prev -mv * $workdir.prev -unzip -q $context_zip $files -ls -lt | head -3 +rm -rf $workdir.new +mkdir $workdir.new +cd $workdir.new || exit 1 +unzip -q $context_zip $files || exit 1 + +cd .. +if diff -ru 0 $workdir $workdir.new; then + rm -rf $workdir.new # same, nothing to do. +else + # changed files, so work -> prev, new -> work. + # differences shown above. + rm -rf $workdir.prev + mv $workdir $workdir.prev || exit 1 + mv $workdir.new $workdir || exit 1 +fi |