Allow for files with spaces

This commit is contained in:
Michael Boelen 2017-09-06 12:55:56 +02:00
parent 61d28ac73c
commit 2451029a6e
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 4 additions and 4 deletions

View File

@ -699,15 +699,15 @@
file=$1
find=""
if [ ! -z "${DPKGBINARY}" ]; then
find=$(${DPKGBINARY} -S ${file} 2> /dev/null | ${AWKBINARY} -F: '{print $1}')
find=$(${DPKGBINARY} -S "${file}" 2> /dev/null | ${AWKBINARY} -F: '{print $1}')
elif [ ! -z "${RPMBINARY}" ]; then
find=$(${RPMBINARY} -qf ${file} 2> /dev/null | ${AWKBINARY} -F- '{print $1}')
find=$(${RPMBINARY} -qf "${file}" 2> /dev/null | ${AWKBINARY} -F- '{print $1}')
fi
if [ ! -z "${find}" ]; then
LogText "Result: file ${file} belongs to package (${find})"
LogText "Result: file '${file}' belongs to package (${find})"
exitcode=0
else
LogText "Result: file ${file} does most likely not belong to a package"
LogText "Result: file '${file}' does most likely not belong to a package"
fi
return ${exitcode}
}