Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
9b8a5e9b
Commit
9b8a5e9b
authored
Apr 21, 2020
by
osm0sis
Committed by
John Wu
Apr 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scripts: add author name back to module install banner print
parent
0f910f2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
module_installer.sh
scripts/module_installer.sh
+8
-4
util_functions.sh
scripts/util_functions.sh
+9
-4
No files found.
scripts/module_installer.sh
View file @
9b8a5e9b
...
...
@@ -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
...
...
scripts/util_functions.sh
View file @
9b8a5e9b
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment