fix installation on ROMs that don't have /system/xbin

merge-requests/23/head
Christopher Roy Bratusek 6 years ago
parent 696664fe77
commit 3cd3bb9438

@ -912,25 +912,25 @@ nanodroid_install_file () {
error " !! file: ${file} not found" error " !! file: ${file} not found"
# if /system/xbin does not exist, use /system/bin # if /system/xbin does not exist, use /system/bin
[ "${dir}" = "xbin" -a "${ROM_NO_XBIN}" -eq 1 ] && dir="bin" [ "${dir}" = "xbin" -a "${ROM_NO_XBIN}" -eq 1 ] && xdir="bin" || xdir="${dir}"
# strip off .${BIN_ARCH} from final filename (if any) # strip off .${BIN_ARCH} from final filename (if any)
xfile=$(basename ${file} .${BIN_ARCH}) xfile=$(basename ${file} .${BIN_ARCH})
echo " installing file: ${xfile}" echo " installing file: ${xfile}"
mkdir -p "${MODPATH}/system/${dir}/" mkdir -p "${MODPATH}/system/${xdir}/"
cp "${INSTALLER}/system/${dir}/${file}" \ cp "${INSTALLER}/system/${dir}/${file}" \
"${MODPATH}/system/${dir}/${xfile}" || \ "${MODPATH}/system/${xdir}/${xfile}" || \
error " !! failed to install ${xfile}" error " !! failed to install ${xfile}"
case ${2} in case ${2} in
bin ) set_perm_bin "${MODPATH}/system/${dir}/${xfile}" ;; bin ) set_perm_bin "${MODPATH}/system/${xdir}/${xfile}" ;;
* ) set_perm_data "${MODPATH}/system/${dir}/${xfile}" ;; * ) set_perm_data "${MODPATH}/system/${xdir}/${xfile}" ;;
esac esac
[ "${MODE}" = "SYSTEM" ] && \ [ "${MODE}" = "SYSTEM" ] && \
echo "/system/${dir}/${xfile}" >> /data/adb/.nanodroid-list echo "/system/${xdir}/${xfile}" >> /data/adb/.nanodroid-list
} }
nanodroid_install_lib () { nanodroid_install_lib () {

Loading…
Cancel
Save