2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-03 10:50:53 +00:00
qpdf/qpdf/qtest/qpdf/diff-ignore-ID-version
Jay Berkenbilt a101533e0a Add command line option to copy encryption from other file
Add --copy-encryption and --encryption-file-password options to qpdf.
Also strengthen test suite for copying encryption.  The strengthened
test suite would have caught the failure to preserve AES and the
failure to update the file version, which was invalidating the
encrypted data.
2012-07-15 21:15:24 -04:00

9 lines
181 B
Bash
Executable File

#!/bin/sh
lines=$(expr + $(diff $1 $2 | egrep '^[<>]' | \
egrep -v '/ID' | egrep -v '%PDF-' | wc -l))
if [ "$lines" = "0" ]; then
echo okay
else
diff -a -U 0 $1 $2
fi