mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-22 18:01:33 +00:00
Set text and background color
This commit is contained in:
parent
68c2817d40
commit
e9f32e4f68
8
build.py
8
build.py
@ -19,7 +19,7 @@ def error(str):
|
|||||||
if no_color:
|
if no_color:
|
||||||
print(f'\n! {str}\n')
|
print(f'\n! {str}\n')
|
||||||
else:
|
else:
|
||||||
print(f'\n\033[41m{str}\033[0m\n')
|
print(f'\n\033[41;30m{str}\033[0m\n')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ def header(str):
|
|||||||
if no_color:
|
if no_color:
|
||||||
print(f'\n{str}\n')
|
print(f'\n{str}\n')
|
||||||
else:
|
else:
|
||||||
print(f'\n\033[44m{str}\033[0m\n')
|
print(f'\n\033[44;30m{str}\033[0m\n')
|
||||||
|
|
||||||
|
|
||||||
def vprint(str):
|
def vprint(str):
|
||||||
@ -38,8 +38,8 @@ def vprint(str):
|
|||||||
is_windows = os.name == 'nt'
|
is_windows = os.name == 'nt'
|
||||||
EXE_EXT = '.exe' if is_windows else ''
|
EXE_EXT = '.exe' if is_windows else ''
|
||||||
|
|
||||||
no_color = 'CI' in os.environ and os.environ['CI'] == 'true'
|
no_color = False
|
||||||
if not no_color and is_windows:
|
if is_windows:
|
||||||
try:
|
try:
|
||||||
import colorama
|
import colorama
|
||||||
colorama.init()
|
colorama.init()
|
||||||
|
@ -19,7 +19,7 @@ type='google_apis'
|
|||||||
api_list='23 26 28 29 33'
|
api_list='23 26 28 29 33'
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
echo -e '\n\033[41m! An error occurred\033[0m\n'
|
echo -e '\n\033[41;30m! An error occurred\033[0m\n'
|
||||||
pkill -INT -P $$
|
pkill -INT -P $$
|
||||||
wait
|
wait
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ run_test() {
|
|||||||
local pid
|
local pid
|
||||||
|
|
||||||
# Setup emulator
|
# Setup emulator
|
||||||
echo -e "\n\033[44m* Testing $pkg\033[0m\n"
|
echo -e "\n\033[44;30m* Testing $pkg\033[0m\n"
|
||||||
"$sdk" $pkg
|
"$sdk" $pkg
|
||||||
echo no | "$avd" create avd -f -n test -k $pkg
|
echo no | "$avd" create avd -f -n test -k $pkg
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user