inject.sh: condense check_release

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-27 11:28:49 +01:00
parent 49a258eafc
commit ad851804b8
+2 -4
View File
@@ -58,12 +58,10 @@ check_release()
[ -z "$archivename" ] && err "Can't determine archive name"
case "$archivename" in
*_src.tar.xz)
err "'$archive' is a src archive, silly!" ;;
*_src.tar.xz) err "'$archive' is a src archive, silly!" ;;
*.tar.xz) _stripped_prefix="${archivename#*_}"
board="${_stripped_prefix%.tar.xz}" ;;
*)
err "'$archive': could not detect board type"
*) err "'$archive': could not detect board type"
esac; :
}