Use "cmp -s" instead of "diff -q ... 1>/dev/null"

OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=103
This commit is contained in:
Johannes Meixner 2014-10-20 09:33:43 +00:00 committed by Git OBS Bridge
parent 88e8e16012
commit bcb98b6c89

View File

@ -450,7 +450,7 @@ make install DESTDIR=%{buildroot}
# https://bugzilla.opensuse.org/show_bug.cgi?id=784670
for pyc in $( find %{buildroot}%{_datadir}/hplip -name '*.pyc' )
do pyo="${pyc%.pyc}.pyo"
if test -f $pyo && cmp -s $pyc $pyo 1>/dev/null
if test -f $pyo && cmp -s $pyc $pyo
then echo hardlinking $pyc and $pyo because both have same content
ln -f $pyc $pyo
fi