Commit a7806d6c authored by Andrew Titmuss's avatar Andrew Titmuss

changed to 1 line if statements

parent 712500a1
...@@ -1507,13 +1507,11 @@ getdisk () { ...@@ -1507,13 +1507,11 @@ getdisk () {
disk_used=${disk_used/G} disk_used=${disk_used/G}
disk_total=${disk_total/G} disk_total=${disk_total/G}
if [[ "$disk_used" == *"T" ]]; then [[ "$disk_used" == *"T" ]] && \
disk_used=$(printf "%s\n" "${disk_used/T} * 1000" | bc) disk_used=$(printf "%s\n" "${disk_used/T} * 1000" | bc)
fi
if [[ "$disk_total" == *"T" ]]; then [[ "$disk_total" == *"T" ]] && \
disk_total=$(printf "%s\n" "${disk_total/T} * 1000" | bc) disk_total=$(printf "%s\n" "${disk_total/T} * 1000" | bc)
fi
case "$disk_display" in case "$disk_display" in
"bar") disk="$(bar "${disk_used/'.'*}" "${disk_total/'.'*}")" ;; "bar") disk="$(bar "${disk_used/'.'*}" "${disk_total/'.'*}")" ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment