diff options
author | Thorsten Schöning <tschoening@users.noreply.github.com> | 2015-11-20 16:34:56 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2016-01-24 17:52:09 +0100 |
commit | 951dbc3b7f58c4718514650130fbe7c543b68e4d (patch) | |
tree | c6fd62b0933158c97e08f79d53f93fb530aa71cc | |
parent | 3c1555a62296e4e28ababba3913838f49fd7b918 (diff) | |
download | qpdf-951dbc3b7f58c4718514650130fbe7c543b68e4d.tar.zst |
Fix expr syntax, support spaces in paths
expr needs ARG + ARG
quote paths to support support spaces
-rwxr-xr-x | qpdf/qtest/qpdf/diff-encrypted | 4 | ||||
-rwxr-xr-x | qpdf/qtest/qpdf/diff-ignore-ID-version | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/qpdf/qtest/qpdf/diff-encrypted b/qpdf/qtest/qpdf/diff-encrypted index d730536c..ac5428cb 100755 --- a/qpdf/qtest/qpdf/diff-encrypted +++ b/qpdf/qtest/qpdf/diff-encrypted @@ -1,7 +1,7 @@ #!/bin/sh -lines=$(expr + $(diff $1 $2 | egrep '^[<>]' | egrep -v '(Date|InstanceID)' | wc -l)) +lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | egrep -v '(Date|InstanceID)' | wc -l)) if [ "$lines" = "0" ]; then echo okay else - diff -a -U 0 $1 $2 + diff -a -U 0 "$1" "$2" fi diff --git a/qpdf/qtest/qpdf/diff-ignore-ID-version b/qpdf/qtest/qpdf/diff-ignore-ID-version index e6b33470..72def443 100755 --- a/qpdf/qtest/qpdf/diff-ignore-ID-version +++ b/qpdf/qtest/qpdf/diff-ignore-ID-version @@ -1,8 +1,8 @@ #!/bin/sh -lines=$(expr + $(diff $1 $2 | egrep '^[<>]' | \ +lines=$(expr 0 + $(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 + diff -a -U 0 "$1" "$2" fi |