script-addon.sh: better helper script detection

gf-arm64
FriendlyNeighborhoodShane 3 years ago
parent 9f429c16fe
commit cb531cf13f

@ -30,13 +30,12 @@ abort() {
log " "; log " ";
log "=== MinMicroG addon.d script ==="; log "=== MinMicroG addon.d script ===";
if [ -f "/tmp/backuptool.functions" ]; then backuptool="";
. "/tmp/backuptool.functions" || abort "could not source addon.d helper"; for file in "/tmp/backuptool.functions" "/postinstall/tmp/backuptool.functions"; do
elif [ -f "/postinstall/tmp/backuptool.functions" ]; then [ -f "$file" ] && { backuptool="$file"; break; }
. "/postinstall/tmp/backuptool.functions" || abort "could not source addon.d helper"; done;
else [ "$backuptool" ] || abort "could not find addon.d helper";
abort "could not find addon.d helper" . "$backuptool" || abort "could not source addon.d helper ($backuptool)";
fi;
[ -f "$S/build.prop" ] || abort "could not find a ROM in $S"; [ -f "$S/build.prop" ] || abort "could not find a ROM in $S";
sdk="$(grep ro.build.version.sdk "$S/build.prop" | head -n1 | cut -d= -f2)"; sdk="$(grep ro.build.version.sdk "$S/build.prop" | head -n1 | cut -d= -f2)";

Loading…
Cancel
Save