diff options
author | Erich Eckner <git@eckner.net> | 2021-06-27 21:16:08 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-06-27 21:16:08 +0200 |
commit | 95cb34527650d45490603819841d45497ebdcb97 (patch) | |
tree | 9733f712f85b355c44d13e39560e08fe5b9f51f7 | |
parent | 6f3d02faa50ca7efba5df0b5217206a171698eb0 (diff) | |
download | print-status-95cb34527650d45490603819841d45497ebdcb97.tar.xz |
print-status-html: fix indentation
-rwxr-xr-x | print-status-html | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/print-status-html b/print-status-html index 4babe08..6a8f12c 100755 --- a/print-status-html +++ b/print-status-html @@ -69,28 +69,28 @@ EOF T p ' /proc/mdstat \ - | sort -u \ - | while read -r line; do - if [ -z "${line%%* finish=*min*}" ]; then - duration="${line##* finish=}" - duration="${duration%%min*}" - time=$( - date +'%F %T' -d@$(( - $(date +%s) + $(echo "60 * ${duration}" | bc -l | sed 's/\..*$//') - )) - ) - printf '%s (%s)\n' "${line}" "${time}" - else - printf '%s\n' "${line}" - fi - done \ - | sed ' - s,.*\[U\+\]$,<font color="#008000">\0</font>, - t - s,^\(re\(shape\|covery\|sync\) \S\+\) \[\(\S*\)>\(\.*\)\] \(\S\+\s\+\S\+\s\+\S\+\)$,<font color="#808000">\1</font> <tt>[<font color="#008000">\3</font><font color="#808000">\></font><font color="#800000">\4</font>]</tt> \5, - t - s,.*,<font color="#800000">\0</font>, - ' + | sort -u \ + | while read -r line; do + if [ -z "${line%%* finish=*min*}" ]; then + duration="${line##* finish=}" + duration="${duration%%min*}" + time=$( + date +'%F %T' -d@$(( + $(date +%s) + $(echo "60 * ${duration}" | bc -l | sed 's/\..*$//') + )) + ) + printf '%s (%s)\n' "${line}" "${time}" + else + printf '%s\n' "${line}" + fi + done \ + | sed ' + s,.*\[U\+\]$,<font color="#008000">\0</font>, + t + s,^\(re\(shape\|covery\|sync\) \S\+\) \[\(\S*\)>\(\.*\)\] \(\S\+\s\+\S\+\s\+\S\+\)$,<font color="#808000">\1</font> <tt>[<font color="#008000">\3</font><font color="#808000">\></font><font color="#800000">\4</font>]</tt> \5, + t + s,.*,<font color="#800000">\0</font>, + ' find /sys/block/ -mindepth 1 -maxdepth 1 -name 'md*' -printf '%f\n' \ | sed 's@^md@@' \ |