mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
inject.sh: simplify. and remove unnecessary check
checking whether archivename is empty isn't needed, because the case/switch afterward would catch this condition. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+1
-3
@@ -38,7 +38,7 @@ inject()
|
||||
esac
|
||||
[ "$new_mac" = "keep" ] && new_mac=""
|
||||
|
||||
check_release
|
||||
x_ e "$archive" f && check_release
|
||||
check_target && patch_release
|
||||
|
||||
[ "$xchanged" = "y" ] && remktar
|
||||
@@ -52,10 +52,8 @@ inject()
|
||||
check_release()
|
||||
{
|
||||
[ -L "$archive" ] && err "'$archive' is a symlink"
|
||||
e "$archive" f missing && err "'$archive' missing"
|
||||
|
||||
archivename="`basename "$archive"`" || err "Can't get '$archive' name"
|
||||
[ -z "$archivename" ] && err "Can't determine archive name"
|
||||
|
||||
case "$archivename" in
|
||||
*_src.tar.xz) err "'$archive' is a src archive, silly!" ;;
|
||||
|
||||
Reference in New Issue
Block a user