scripts: add author name back to module install banner print
This commit is contained in:
parent
0f910f2d40
commit
9b8a5e9bf3
@ -48,12 +48,15 @@ is_legacy_script() {
|
||||
}
|
||||
|
||||
print_modname() {
|
||||
local len
|
||||
len=`echo -n $MODNAME | wc -c`
|
||||
local authlen len namelen pounds
|
||||
namelen=`echo -n $MODNAME | wc -c`
|
||||
authlen=$((`echo -n $MODAUTH | wc -c` + 3))
|
||||
[ $namelen -gt $authlen ] && len=$namelen || len=$authlen
|
||||
len=$((len + 2))
|
||||
local pounds=`printf "%${len}s" | tr ' ' '*'`
|
||||
pounds=$(printf "%${len}s" | tr ' ' '*')
|
||||
ui_print "$pounds"
|
||||
ui_print " $MODNAME "
|
||||
ui_print " by $MODAUTH "
|
||||
ui_print "$pounds"
|
||||
ui_print "*******************"
|
||||
ui_print " Powered by Magisk "
|
||||
@ -95,8 +98,9 @@ unzip -o "$ZIPFILE" module.prop -d $TMPDIR >&2
|
||||
$BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules
|
||||
MODULEROOT=$NVBASE/$MODDIRNAME
|
||||
MODID=`grep_prop id $TMPDIR/module.prop`
|
||||
MODPATH=$MODULEROOT/$MODID
|
||||
MODNAME=`grep_prop name $TMPDIR/module.prop`
|
||||
MODAUTH=`grep_prop author $TMPDIR/module.prop`
|
||||
MODPATH=$MODULEROOT/$MODID
|
||||
|
||||
# Create mod paths
|
||||
rm -rf $MODPATH 2>/dev/null
|
||||
|
@ -61,11 +61,15 @@ resolve_vars() {
|
||||
}
|
||||
|
||||
print_title() {
|
||||
local len=$(echo -n $1 | wc -c)
|
||||
local len line1len line2len pounds
|
||||
line1len=$(echo -n $1 | wc -c)
|
||||
line2len=$(echo -n $2 | wc -c)
|
||||
[ $line1len -gt $line2len ] && len=$line1len || len=$line2len
|
||||
len=$((len + 2))
|
||||
local pounds=$(printf "%${len}s" | tr ' ' '*')
|
||||
pounds=$(printf "%${len}s" | tr ' ' '*')
|
||||
ui_print "$pounds"
|
||||
ui_print " $1 "
|
||||
[ "$2" ] && ui_print " $2 "
|
||||
ui_print "$pounds"
|
||||
}
|
||||
|
||||
@ -654,8 +658,9 @@ install_module() {
|
||||
$BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules
|
||||
local MODULEROOT=$NVBASE/$MODDIRNAME
|
||||
MODID=`grep_prop id $TMPDIR/module.prop`
|
||||
MODPATH=$MODULEROOT/$MODID
|
||||
MODNAME=`grep_prop name $TMPDIR/module.prop`
|
||||
MODAUTH=`grep_prop author $TMPDIR/module.prop`
|
||||
MODPATH=$MODULEROOT/$MODID
|
||||
|
||||
# Create mod paths
|
||||
rm -rf $MODPATH 2>/dev/null
|
||||
@ -681,7 +686,7 @@ install_module() {
|
||||
ui_print "- Setting permissions"
|
||||
set_permissions
|
||||
else
|
||||
print_title "$MODNAME"
|
||||
print_title "$MODNAME" "by $MODAUTH"
|
||||
print_title "Powered by Magisk"
|
||||
|
||||
unzip -o "$ZIPFILE" customize.sh -d $MODPATH >&2
|
||||
|
Loading…
Reference in New Issue
Block a user