Fix: files checks.

Now it will be able to list those files which not exist in termux. 
#6
This commit is contained in:
Krishna Kanhaiya 2020-11-21 08:33:34 +05:30 committed by GitHub
parent 451422bc8f
commit 3d40821f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 9 deletions

View File

@ -119,15 +119,6 @@ if ${REVERSE_MODE}; then
echo "SELECT owned_file FROM 'whatprovides' WHERE package_name == '${1}' ORDER BY owned_file;" | \
sqlite3 "${DB_PATH}" | awk "{ print \"${1}: \"\$0 }"
else
if [ ! -e "$1" ]; then
{
echo
echo "Error: file '$1' is not found."
echo
} >&2
exit 1
fi
echo "SELECT package_name FROM 'whatprovides' WHERE owned_file == '$(realpath "${1}")' ORDER BY package_name;" | \
sqlite3 "${DB_PATH}" | awk "{ print \$0\": $(realpath "${1}")\" }"
fi