mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-12 06:22:56 +02:00
Do not rely on bashisms and behaviour undefined by the POSIX specification. Part 2
Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
This commit is contained in:
committed by
Leah Rowe
parent
f787044642
commit
7f5dfebf7d
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||
# SPDX-FileCopyrightText: 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
Fail(){
|
||||
@@ -53,10 +54,10 @@ Detect_board(){
|
||||
filename=$(basename ${rom})
|
||||
case ${filename} in
|
||||
grub_*)
|
||||
board=$(cut -d '_' -f2-3 <<<${filename})
|
||||
board=$(echo "${filename}" | cut -d '_' -f2-3)
|
||||
;;
|
||||
seabios_withgrub_*)
|
||||
board=$(cut -d '_' -f3-4 <<<${filename})
|
||||
board=$(echo "${filename}" | cut -d '_' -f3-4)
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user