diff options
author | midipix <writeonce@midipix.org> | 2021-03-21 08:43:18 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-03-23 09:55:11 +0000 |
commit | 075789f96464874b58731d19975dff0e728824e7 (patch) | |
tree | d6eb386591078b48d817c97679f82f08473fefc9 | |
parent | 8b555aa140fe306dea6795fc349ea5bdc4bf8bc6 (diff) | |
download | sofort-075789f96464874b58731d19975dff0e728824e7.tar.bz2 sofort-075789f96464874b58731d19975dff0e728824e7.tar.xz |
build system: ccenv_{tool|attr}_epilog(): properly handle long output strings.
-rw-r--r-- | sofort/ccenv/ccenv.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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}" |