From e79981bdbee233c22e1b67f979a48537071882dd Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 26 Apr 2020 07:34:39 -0700 Subject: [PATCH] Fix spaces in drive model causing issues. --- archlabs-installer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archlabs-installer b/archlabs-installer index a1922fd..ddc21a0 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -7,7 +7,7 @@ # shellcheck disable=SC2086,SC2046,SC2254 -VER=2.1.36 +VER=2.1.37 # default values { @@ -995,9 +995,9 @@ part_pretty() isize=${s:0:-1} isize=${isize%.*} if [[ $dev = /dev/nvme* ]]; then - model=$(lsblk -lno MODEL "${dev%p[1-9]}") + model=$(lsblk -lno MODEL "${dev%p[1-9]}" | awk '{gsub(/ /, "_"); print}') else - model=$(lsblk -lno MODEL "${dev%[1-9]}") + model=$(lsblk -lno MODEL "${dev%[1-9]}" | awk '{gsub(/ /, "_"); print}') fi [[ $size_t == 'K' || ($size_t == 'M' && $isize -lt 80) ]] || printf "%s\n" "$dev ${size}__$model" done < <(lsblk -lno TYPE,PATH,SIZE,FSTYPE,LABEL $part |