From 951dbc3b7f58c4718514650130fbe7c543b68e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Sch=C3=B6ning?= Date: Fri, 20 Nov 2015 16:34:56 +0100 Subject: [PATCH] Fix expr syntax, support spaces in paths expr needs ARG + ARG quote paths to support support spaces --- qpdf/qtest/qpdf/diff-encrypted | 4 ++-- 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