Aesthetic changes.

master
Icedream 2018-02-20 03:26:57 +01:00
parent ca44a67c9d
commit 2c7f0d61c2
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 7 additions and 3 deletions

View File

@ -27,7 +27,7 @@ has_binary() {
section() { section() {
if [ $PROFILE_DEBUG -gt 0 ]; then if [ $PROFILE_DEBUG -gt 0 ]; then
log "${PROFILE_DEBUG_SECTION_START_PREFIX}$(tput smso)$*$(tput rmso)" NO_SPACE_PREFIX=1 log "${PROFILE_DEBUG_SECTION_START_PREFIX}$(tput smso)$*$(tput rmso)"
fi fi
DEBUG_INDENT=$(expr $DEBUG_INDENT + 1) DEBUG_INDENT=$(expr $DEBUG_INDENT + 1)
} }
@ -35,7 +35,7 @@ section() {
section_end() { section_end() {
DEBUG_INDENT=$(expr $DEBUG_INDENT - 1) DEBUG_INDENT=$(expr $DEBUG_INDENT - 1)
if [ $PROFILE_DEBUG -gt 0 ]; then if [ $PROFILE_DEBUG -gt 0 ]; then
log "$PROFILE_DEBUG_SECTION_END_TEXT" NO_SPACE_PREFIX=1 log "$PROFILE_DEBUG_SECTION_END_TEXT"
fi fi
} }
@ -47,8 +47,12 @@ log() {
indent="${indent}${PROFILE_DEBUG_INDENT}" indent="${indent}${PROFILE_DEBUG_INDENT}"
done done
fi fi
prefix=" "
if [ $NO_SPACE_PREFIX -gt 0 ]; then
prefix=""
fi
echo "$*" | while IFS= read -r line; do echo "$*" | while IFS= read -r line; do
echo "$indent" "$line" echo "$indent$prefix$line"
done done
fi fi
} }