diff options
Diffstat (limited to 'Master/texmf-dist/source/eplain/base/fix-checksum')
-rw-r--r-- | Master/texmf-dist/source/eplain/base/fix-checksum | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/eplain/base/fix-checksum b/Master/texmf-dist/source/eplain/base/fix-checksum new file mode 100644 index 00000000000..c2f830f10f3 --- /dev/null +++ b/Master/texmf-dist/source/eplain/base/fix-checksum @@ -0,0 +1,20 @@ +#!/bin/sh +# This file is public domain. + +# Fix a checksum line in the files given as arguments. + +tmpfile=/tmp/checksum$$ + +for f in $* +do + checksum="" + newchecksum=`wc < $f | sed "s/^ *//"` + while test "$checksum" != "$newchecksum" + do + sed -e "1,50s/checksum = .*,/checksum = \"$newchecksum\",/" $f > $tmpfile + checksum="$newchecksum" + newchecksum=`wc < $tmpfile | sed "s/^ *//"` + done + mv -f $tmpfile $f +done + |