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
ff3f3779
Commit
ff3f3779
authored
Oct 20, 2021
by
osm0sis
Committed by
John Wu
Oct 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scripts: touch up print_title
- stars aren't pounds, let's just call it a title bar :P
parent
18065826
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
util_functions.sh
scripts/util_functions.sh
+4
-4
No files found.
scripts/util_functions.sh
View file @
ff3f3779
...
@@ -72,17 +72,17 @@ resolve_vars() {
...
@@ -72,17 +72,17 @@ resolve_vars() {
}
}
print_title
()
{
print_title
()
{
local
len line1len line2len
pounds
local
len line1len line2len
bar
line1len
=
$(
echo
-n
$1
|
wc
-c
)
line1len
=
$(
echo
-n
$1
|
wc
-c
)
line2len
=
$(
echo
-n
$2
|
wc
-c
)
line2len
=
$(
echo
-n
$2
|
wc
-c
)
len
=
$line2len
len
=
$line2len
[
$line1len
-gt
$line2len
]
&&
len
=
$line1len
[
$line1len
-gt
$line2len
]
&&
len
=
$line1len
len
=
$((
len
+
2
))
len
=
$((
len
+
2
))
pounds
=
$(
printf
"%
${
len
}
s"
|
tr
' '
'*'
)
bar
=
$(
printf
"%
${
len
}
s"
|
tr
' '
'*'
)
ui_print
"
$
pounds
"
ui_print
"
$
bar
"
ui_print
"
$1
"
ui_print
"
$1
"
[
"
$2
"
]
&&
ui_print
"
$2
"
[
"
$2
"
]
&&
ui_print
"
$2
"
ui_print
"
$
pounds
"
ui_print
"
$
bar
"
}
}
######################
######################
...
...
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