mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-24 21:54:11 +02:00
vendor.sh: condense detect_board() a bit
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+3
-6
@@ -264,17 +264,14 @@ detect_board()
|
|||||||
path="$1"
|
path="$1"
|
||||||
filename="$(basename "$path")"
|
filename="$(basename "$path")"
|
||||||
case "$filename" in
|
case "$filename" in
|
||||||
grub_*)
|
grub_*) board="$(echo "$filename" | cut -d '_' -f2-3)" ;;
|
||||||
board="$(echo "$filename" | cut -d '_' -f2-3)" ;;
|
|
||||||
seabios_withgrub_*)
|
seabios_withgrub_*)
|
||||||
board="$(echo "$filename" | cut -d '_' -f3-4)" ;;
|
board="$(echo "$filename" | cut -d '_' -f3-4)" ;;
|
||||||
*.tar.xz)
|
*.tar.xz)
|
||||||
_stripped_prefix="${filename#*_}"
|
_stripped_prefix="${filename#*_}"
|
||||||
board="${_stripped_prefix%.tar.xz}" ;;
|
board="${_stripped_prefix%.tar.xz}" ;;
|
||||||
*)
|
*) $err "detect_board $filename: could not detect board type"
|
||||||
$err "detect_board $filename: could not detect board type"
|
esac; printf "%s\n" "$board"
|
||||||
esac
|
|
||||||
printf "%s\n" "$board"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
readcfg()
|
readcfg()
|
||||||
|
|||||||
Reference in New Issue
Block a user