From 972e61070b1c087c03f9cf850345d500d4d90151 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 29 Jun 2024 01:47:14 +0100 Subject: vendor.sh: condense detect_board() a bit Signed-off-by: Leah Rowe --- include/vendor.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/vendor.sh b/include/vendor.sh index b0bd2ae9..0c9a3712 100755 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -264,17 +264,14 @@ detect_board() path="$1" filename="$(basename "$path")" case "$filename" in - grub_*) - board="$(echo "$filename" | cut -d '_' -f2-3)" ;; + grub_*) board="$(echo "$filename" | cut -d '_' -f2-3)" ;; seabios_withgrub_*) board="$(echo "$filename" | cut -d '_' -f3-4)" ;; *.tar.xz) _stripped_prefix="${filename#*_}" board="${_stripped_prefix%.tar.xz}" ;; - *) - $err "detect_board $filename: could not detect board type" - esac - printf "%s\n" "$board" + *) $err "detect_board $filename: could not detect board type" + esac; printf "%s\n" "$board" } readcfg() -- cgit v1.2.1