vendor.sh: condense detect_board() a bit
Signed-off-by: Leah Rowe <leah@libreboot.org>audit6
parent
bf5acedb12
commit
972e61070b
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue