update-whatprovides-db.sh: define TERMUX_PREFIX

This commit is contained in:
Leonid Pliushch 2020-11-22 00:09:22 +02:00
parent c372df97f6
commit 78b19eef01
No known key found for this signature in database
GPG Key ID: 45F2964132545795
1 changed files with 3 additions and 1 deletions

View File

@ -6,10 +6,12 @@
set -e -u
: "${TERMUX_PREFIX:="/data/data/com.termux/files/usr"}"
list_files() {
dpkg-deb -c "${1}" | grep -o "/data/data/com\.termux/files/.\+" \
| sed -E 's@(.*) ->..*@\1@g;s@/$@@g' \
| xargs -rd\\n realpath -sm --relative-base=$TERMUX_PREFIX --
| xargs -rd\\n realpath -sm --relative-base="$TERMUX_PREFIX" --
}
write_sql_script() {