2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-07 04:40:52 +00:00

Fix expr syntax, support spaces in paths

expr needs ARG + ARG
quote paths to support support spaces
This commit is contained in:
Thorsten Schöning 2015-11-20 16:34:56 +01:00 committed by Jay Berkenbilt
parent 3c1555a622
commit 951dbc3b7f
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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