Refactor logic to allow overwriting modname

This commit is contained in:
FriendlyNeighborhoodShane 2020-03-23 16:22:21 +05:30
parent 14812b1782
commit e972e1d246

View File

@ -70,10 +70,6 @@ done;
$bootmode && filedir="/dev/tmp/$modname" || filedir="/tmp/$modname";
tmplibdir="$filedir/tmplibdir";
moddir="/data/media/0/$modname";
backupdir="$moddir/Backup";
initdfile="/system/etc/init.d/10-$modname";
addondfile="/system/addon.d/10-$modname.sh";
$bootmode && forcesys=no;
case "$(basename "$zipfile")" in
@ -322,6 +318,11 @@ unzip -o "$zipfile" "defconf" -d "$filedir/";
chmod 0777 "$filedir/defconf";
. "$filedir/defconf" || abort "Could not execute default config";
moddir="/data/media/0/$modname";
backupdir="$moddir/Backup";
initdfile="/system/etc/init.d/10-$modname";
addondfile="/system/addon.d/10-$modname.sh";
ui_print " ";
ui_print "Package: $variant";
ui_print "Version: $ver";