diff options
author | midipix <writeonce@midipix.org> | 2021-03-21 08:43:18 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-03-21 08:44:54 +0000 |
commit | c04745e1e83115888fc15697b1ca9fdf330b4153 (patch) | |
tree | a17dd1d1087493cf2d13033012dbd18d029b722a /sofort/ccenv/ccenv.sh | |
parent | 430840c04ba2ae086226e2ba68966a16894b3fd2 (diff) | |
download | slibtool-c04745e1e83115888fc15697b1ca9fdf330b4153.tar.bz2 slibtool-c04745e1e83115888fc15697b1ca9fdf330b4153.tar.xz |
build system: ccenv_{tool|attr}_epilog(): properly handle long output strings.
Diffstat (limited to 'sofort/ccenv/ccenv.sh')
-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}" |