summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-06-27 21:16:08 +0200
committerErich Eckner <git@eckner.net>2021-06-27 21:16:08 +0200
commit95cb34527650d45490603819841d45497ebdcb97 (patch)
tree9733f712f85b355c44d13e39560e08fe5b9f51f7
parent6f3d02faa50ca7efba5df0b5217206a171698eb0 (diff)
downloadprint-status-95cb34527650d45490603819841d45497ebdcb97.tar.xz
print-status-html: fix indentation
-rwxr-xr-xprint-status-html44
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">\&gt;</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">\&gt;</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@@' \