mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 10:12:04 +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
|
esac
|
||||||
[ "$new_mac" = "keep" ] && new_mac=""
|
[ "$new_mac" = "keep" ] && new_mac=""
|
||||||
|
|
||||||
check_release
|
x_ e "$archive" f && check_release
|
||||||
check_target && patch_release
|
check_target && patch_release
|
||||||
|
|
||||||
[ "$xchanged" = "y" ] && remktar
|
[ "$xchanged" = "y" ] && remktar
|
||||||
@@ -52,10 +52,8 @@ inject()
|
|||||||
check_release()
|
check_release()
|
||||||
{
|
{
|
||||||
[ -L "$archive" ] && err "'$archive' is a symlink"
|
[ -L "$archive" ] && err "'$archive' is a symlink"
|
||||||
e "$archive" f missing && err "'$archive' missing"
|
|
||||||
|
|
||||||
archivename="`basename "$archive"`" || err "Can't get '$archive' name"
|
archivename="`basename "$archive"`" || err "Can't get '$archive' name"
|
||||||
[ -z "$archivename" ] && err "Can't determine archive name"
|
|
||||||
|
|
||||||
case "$archivename" in
|
case "$archivename" in
|
||||||
*_src.tar.xz) err "'$archive' is a src archive, silly!" ;;
|
*_src.tar.xz) err "'$archive' is a src archive, silly!" ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user