diff options
author | midipix <writeonce@midipix.org> | 2021-03-21 08:43:18 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-03-23 09:55:09 +0000 |
commit | d064517e9221580ded49c99417a5199c0dd99def (patch) | |
tree | e15923428ebea438786942a14254ab5a593fcddf /sofort | |
parent | 585853f0bc87b0904ff217441b0a16baaec879f3 (diff) | |
download | mdso-d064517e9221580ded49c99417a5199c0dd99def.tar.bz2 mdso-d064517e9221580ded49c99417a5199c0dd99def.tar.xz |
build system: ccenv_{tool|attr}_epilog(): properly handle long output strings.
Diffstat (limited to 'sofort')
-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}" |