mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
config/functions: add build message printf helpers
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
4ad81f9999
commit
b8e57d9dfe
@ -85,6 +85,23 @@ print_color() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# print build progress messages
|
||||||
|
# param1: message color, p2: label, p3: text, p4: indent (optional)
|
||||||
|
build_msg() {
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
printf "%${BUILD_INDENT}c$(print_color "${1}" "${2}") ${3}\n" ' '>&${SILENT_OUT}
|
||||||
|
else
|
||||||
|
printf "%${BUILD_INDENT}c$(print_color "${1}" "${2}")\n" ' '>&${SILENT_OUT}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pad left space to create "indent" effect
|
||||||
|
if [ "${4}" = "indent" ]; then
|
||||||
|
export BUILD_INDENT=$((${BUILD_INDENT:-0}+${BUILD_INDENT_SIZE}))
|
||||||
|
elif [ -n "${4}" ]; then
|
||||||
|
die "ERROR: ${0} unexpected parameter: ${4}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
### BUILDSYSTEM HELPERS ###
|
### BUILDSYSTEM HELPERS ###
|
||||||
# check if a flag is enabled
|
# check if a flag is enabled
|
||||||
|
Loading…
x
Reference in New Issue
Block a user