From 4b42375113701d661a025d7d8ef70d62b90fb3a6 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sat, 29 Aug 2015 22:12:00 -0400 Subject: build/roms/withgrub: don't use ls --- (limited to 'resources') diff --git a/resources/scripts/helpers/build/roms/withgrub b/resources/scripts/helpers/build/roms/withgrub index e6ac268..5d2f31b 100755 --- a/resources/scripts/helpers/build/roms/withgrub +++ b/resources/scripts/helpers/build/roms/withgrub @@ -38,7 +38,7 @@ if [ $# -gt 0 ]; then boards="$@" else # build all ROM images - boards="$(ls resources/libreboot/config/grub/)" + boards="$(for board in resources/libreboot/config/grub/*; do printf "%s\n" "${board##*/}"; done)" fi @@ -54,7 +54,7 @@ do cd "../../../coreboot" # GRUB configuration files - for keymap in $(ls "../resources/utilities/grub-assemble/keymap/original/") + for keymap in $(for keylayout in ../resources/utilities/grub-assemble/keymap/original/*; do printf "%s\n" "${keylayout##*/}"; done) do cat "../resources/grub/config/extra/common.cfg" > "grub_${keymap}_${romtype}.cfg" cat "../resources/grub/config/extra/${romtype}.cfg" >> "grub_${keymap}_${romtype}.cfg" @@ -81,7 +81,7 @@ for i945board in "x60" "t60" do if [ -d "bin/grub/${i945board}/" ]; then cd "bin/grub/${i945board}/" - for i945rom in $(ls) + for i945rom in * do dd if="${i945rom}" of=top64k.bin bs=1 skip=$[$(stat -c %s "${i945rom}") - 0x10000] count=64k dd if=top64k.bin of="${i945rom}" bs=1 seek=$[$(stat -c %s "${i945rom}") - 0x20000] count=64k conv=notrunc @@ -102,7 +102,7 @@ if [ -d "bin/grub/" ]; then if [ -d "${board}_${romsize}b/" ]; then cd "${board}_${romsize}b/" ../../../resources/utilities/ich9deblob/ich9gen - for rom in $(ls) + for rom in * do dd if="ich9fdgbe_${romsize}.bin" of="${rom}" bs=1 count=12k conv=notrunc done diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper index 05f5bf2..15b127a 100755 --- a/resources/scripts/helpers/build/roms/withgrub_helper +++ b/resources/scripts/helpers/build/roms/withgrub_helper @@ -97,7 +97,7 @@ do fi # Add the correct GRUB configuration file for this image. - for keymap in $(for keymap in ../resources/utilities/grub-assemble/keymap/original/*; do printf "%s\n" "${keymap##*/}"; done) + for keymap in $(for keylayout in ../resources/utilities/grub-assemble/keymap/original/*; do printf "%s\n" "${keylayout##*/}"; done) do # copy the images based on the keymap cp "${1}_${romtype}.rom" "${1}_${keymap}_${romtype}.rom" -- cgit v0.9.1