From e053f11e7b5db58651fae3dab98fd2ff6f0f8ed3 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 21 Mar 2021 08:43:18 +0000 Subject: build system: ccenv_{tool|attr}_epilog(): properly handle long output strings. --- sofort/ccenv/ccenv.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sofort/ccenv') diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh index fd09506..4b91387 100644 --- a/sofort/ccenv/ccenv.sh +++ b/sofort/ccenv/ccenv.sh @@ -68,6 +68,11 @@ ccenv_tool_epilog() ccenv_line_dots='................................' ccenv_tool_dlen="$((${#ccenv_line_dots} - ${#1}))" + case ${ccenv_tool_dlen} in + 0 | -* ) + ccenv_tool_dlen='3' ;; + esac + printf "%${ccenv_tool_dlen}.${ccenv_tool_dlen}s %s.\n" \ "${ccenv_line_dots}" "${1}" @@ -110,6 +115,11 @@ ccenv_attr_epilog() ccenv_line_dots='................................' ccenv_tool_dlen="$((${#ccenv_line_dots} - 1 - ${#1}))" + case ${ccenv_tool_dlen} in + 0 | -* ) + ccenv_tool_dlen='3' ;; + esac + printf "%${ccenv_tool_dlen}.${ccenv_tool_dlen}s %s.\n" \ "${ccenv_line_dots}" "${1}" -- cgit v1.2.3