summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-21 17:13:20 +0000
committerKarl Berry <karl@freefriends.org>2020-05-21 17:13:20 +0000
commit89196b0ed409542647040a6706a4153df23e3d58 (patch)
tree3b5e99ddae220501a6303028e71403e60290c1e1 /Master
parent7036dcd55aacf74885d8ce333f86877f634e85ca (diff)
only update mptopdf dir when there are changes to
the files; the mtimes change every day. git-svn-id: svn://tug.org/texlive/trunk@55226 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/tlpkg/libexec/mptopdf-extract22
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