diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-18 12:37:55 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-18 12:37:55 +0100 |
commit | 08ad9eb15f17c29c148c212e0c995a5eda1eba49 (patch) | |
tree | 443c920bd03bd5ecd1ac097a500855fb825064c6 /resources | |
parent | 8d9570b6f7a844df24a6b0ec3a41bdb8a3687b74 (diff) |
download/coreboot: minor cleanup
Diffstat (limited to 'resources')
-rwxr-xr-x | resources/scripts/download/coreboot | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/resources/scripts/download/coreboot b/resources/scripts/download/coreboot index 512616dd..0092aecb 100755 --- a/resources/scripts/download/coreboot +++ b/resources/scripts/download/coreboot @@ -2,8 +2,7 @@ # helper script: download coreboot # -# Copyright (C) 2014,2015,2016,2020,2021,2023 Leah Rowe -# <info@minifree.org> +# Copyright (C) 2014-2016,2020,2021,2023 Leah Rowe <info@minifree.org> # Copyright (C) 2022 Alper Nebi Yasak <alpernebiyasak@gmail.com> # Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com> # @@ -38,9 +37,9 @@ main() elif [ $# -eq 1 ] && [ "$1" = "--list-boards" ] ; then list_supported_boards exit 0 - else - fetch_coreboot_trees $@ fi + + fetch_coreboot_trees $@ } fetch_coreboot_trees() @@ -53,13 +52,13 @@ fetch_coreboot_trees() if [ $# -gt 0 ]; then boards=$@ else - for board in ${cbcfgsdir}/*; do + for board in "${cbcfgsdir}/"*; do [ ! -d "${board}" ] && continue boards="${boards} ${board##*/}" done fi for board in ${boards}; do - rm -f ${cbcfgsdir}/*/seen + rm -f "${cbcfgsdir}"/*/seen download_coreboot_for_board "${board}" done @@ -74,7 +73,7 @@ download_coreboot_for_board() fetch_coreboot_config "${_board}" || exit 1 - rm -f ${cbcfgsdir}/*/seen + rm -f "${cbcfgsdir}"/*/seen if [ -d "coreboot/${cbtree}" ]; then printf "REMARK: download/coreboot %s: exists. Skipping.\n" \ @@ -120,7 +119,6 @@ fetch_coreboot_config() break fi done - return 0 } check_config_for_board() @@ -138,7 +136,6 @@ check_config_for_board() return 1 fi touch "${cbcfgsdir}/${_board}/seen" - return 0 } gitclone_coreboot_from_upstream() @@ -153,7 +150,6 @@ gitclone_coreboot_from_upstream() return 1 ./gitclone coreboot || \ return 1 - return 0 } prepare_new_coreboot_tree() @@ -172,7 +168,7 @@ prepare_new_coreboot_tree() git reset --hard ${cbrevision} || exit 1 git submodule update --init --checkout || exit 1 - for patch in ../../${cbcfgsdir}/${cbtree}/patches/*.patch; do + for patch in ../../"${cbcfgsdir}"/"${cbtree}"/patches/*.patch; do [ ! -f "${patch}" ] && \ continue if ! git am "${patch}"; then @@ -204,7 +200,7 @@ usage() list_supported_boards() { - for _board in ${cbcfgsdir}/*; do + for _board in "${cbcfgsdir}/"*; do echo ${_board} | sed 's#${cbcfgsdir}/##' done } |