2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

CommonInstaller: improve nanodroid_substitute

This commit is contained in:
Christopher Roy Bratusek 2018-03-28 20:31:11 +02:00
parent 78925b625c
commit c3e9e7f997

View File

@ -1001,7 +1001,15 @@ nanodroid_install_lib () {
}
nanodroid_substitute () {
target="${MODPATH}/system/${1}"
dir="$(dirname "${1}")"
file="$(basename "${1}")"
# if /system/xbin does not exist, use /system/bin
[ "${dir}" = "xbin" -a "${ROM_NO_XBIN}" -eq 1 ] && dir="bin"
target="${MODPATH}/system/${dir}/${file}"
[ ! -f "${target}" ] && error " !! file: ${file} not found"
if grep -q @ZIPDIR@ "${target}"; then
if [[ "${ZIPDIR}" == "/external_sd" ]]; then