summaryrefslogtreecommitdiffstats
path: root/resources/utilities
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-06-10 20:30:48 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-06-10 20:30:48 (EDT)
commit12c50f7939c02db85f05830c4b9fccf464b3977a (patch)
tree42c0b72ee957cc2f70b442cefb14923b06cb8507 /resources/utilities
parent34270811fce1ecf0bcf3b1363b0dc3dbf284ab09 (diff)
downloadlibreboot-12c50f7939c02db85f05830c4b9fccf464b3977a.zip
libreboot-12c50f7939c02db85f05830c4b9fccf464b3977a.tar.gz
libreboot-12c50f7939c02db85f05830c4b9fccf464b3977a.tar.bz2
all script: use a standard style
Based on the style used for the script in resources/scripts/helpers/build/release/
Diffstat (limited to 'resources/utilities')
-rwxr-xr-xresources/utilities/coreboot-libre/deblob4
-rwxr-xr-xresources/utilities/coreboot-libre/findblobs26
-rwxr-xr-xresources/utilities/grub-assemble/gen.sh36
-rwxr-xr-xresources/utilities/grub-assemble/grub_memdisk_keymap2
4 files changed, 34 insertions, 34 deletions
diff --git a/resources/utilities/coreboot-libre/deblob b/resources/utilities/coreboot-libre/deblob
index 26fb75f..3ca64bb 100755
--- a/resources/utilities/coreboot-libre/deblob
+++ b/resources/utilities/coreboot-libre/deblob
@@ -26,7 +26,7 @@ set -u -e
printf "Deleting blobs in coreboot\n"
-cd coreboot/
+cd "coreboot/"
# ---------------------
# Intel SoC (broadwell): CPU microcode updates
@@ -161,4 +161,4 @@ rm -f \
printf "\n\n"
-cd ../
+cd "../"
diff --git a/resources/utilities/coreboot-libre/findblobs b/resources/utilities/coreboot-libre/findblobs
index 7d9b5b0..4fcda2a 100755
--- a/resources/utilities/coreboot-libre/findblobs
+++ b/resources/utilities/coreboot-libre/findblobs
@@ -30,29 +30,29 @@ set -e -u
# this will have to do.
printf "Searching for blobs in coreboot\n"
-cp deblob-check ../../../coreboot
-cd ../../../coreboot/
+cp "deblob-check" "../../../coreboot"
+cd "../../../coreboot/"
-chmod +x deblob-check
-find -type f | xargs ./deblob-check > blobs
-rm -f deblob-check
+chmod +x "deblob-check"
+find -type f | xargs ./deblob-check > "blobs"
+rm -f "deblob-check"
-rm -f tocheck
-touch tocheck
+rm -f "tocheck"
+touch "tocheck"
for file in $(cat blobs)
do
- if ! grep -Fxq "$file" ../resources/utilities/coreboot-libre/nonblobs
+ if ! grep -Fxq "${file}" "../resources/utilities/coreboot-libre/nonblobs"
then
- echo "$file" >> tocheck
+ printf "%s\n" "${file}" >> tocheck
fi
done
-rm -f blobs
+rm -f "blobs"
-rm -f ../resources/utilities/coreboot-libre/tocheck
-mv tocheck ../resources/utilities/coreboot-libre
+rm -f "../resources/utilities/coreboot-libre/tocheck"
+mv "tocheck" "../resources/utilities/coreboot-libre/"
-cd ../resources/utilities/coreboot-libre
+cd "../resources/utilities/coreboot-libre/"
printf "Done! open resources/utilities/coreboot-libre/tocheck in an editor\n"
printf "This will contain the names of the files that you must decide whether they are blobs or not\n\n"
diff --git a/resources/utilities/grub-assemble/gen.sh b/resources/utilities/grub-assemble/gen.sh
index 8174939..3dfed2c 100755
--- a/resources/utilities/grub-assemble/gen.sh
+++ b/resources/utilities/grub-assemble/gen.sh
@@ -11,10 +11,10 @@
set -u -e
if (( $# != 1 )); then
- echo "Usage: ./gen.sh mode"
- echo "Example: ./gen.sh vesafb"
- echo "Example: ./gen.sh txtmode"
- echo "You need to specify exactly 1 argument"
+ printf "Usage: ./gen.sh mode\n"
+ printf "Example: ./gen.sh vesafb\n"
+ printf "Example: ./gen.sh txtmode\n"
+ printf "You need to specify exactly 1 argument\n"
exit 1
fi
@@ -24,36 +24,36 @@ grubdir="../../../grub"
source "modules.conf"
printf "Creating GRUB ELF executable for configuration '$1'\n"
-if [ "$1" = "vesafb" ]
+if [ "${1}" = "vesafb" ]
then
# Generate the grub.elf (vesafb)
$grubdir/grub-mkstandalone \
- --grub-mkimage=$grubdir/grub-mkimage \
+ --grub-mkimage="${grubdir}/grub-mkimage" \
-O i386-coreboot \
- -o grub_vesafb.elf \
- -d $grubdir/grub-core/ \
+ -o "grub_vesafb.elf" \
+ -d "${grubdir}/grub-core/" \
--fonts= --themes= --locales= \
- --modules="$grub_modules" \
- --install-modules="$grub_install_modules" \
+ --modules="${grub_modules}" \
+ --install-modules="${grub_install_modules}" \
/boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \
/dejavusansmono.pf2="../../../resources/grub/font/dejavusansmono.pf2" \
$(./grub_memdisk_keymap)
-elif [ "$1" = "txtmode" ]
+elif [ "${1}" = "txtmode" ]
then
# Generate the grub.elf (txtmode)
- $grubdir/grub-mkstandalone \
- --grub-mkimage=$grubdir/grub-mkimage \
+ "${grubdir}/grub-mkstandalone" \
+ --grub-mkimage="${grubdir}/grub-mkimage" \
-O i386-coreboot \
- -o grub_txtmode.elf \
- -d $grubdir/grub-core/ \
+ -o "grub_txtmode.elf" \
+ -d "${grubdir}/grub-core/" \
--fonts= --themes= --locales= \
- --modules="$grub_modules" \
- --install-modules="$grub_install_modules" \
+ --modules="${grub_modules}" \
+ --install-modules="${grub_install_modules}" \
/boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \
/memtest="../../../memtest86+-5.01/memtest" \
$(./grub_memdisk_keymap)
else
- echo "grub-assemble gen.sh: invalid mode '$1'"
+ printf "grub-assemble gen.sh: invalid mode '%s'\n" "${1}"
exit 1
fi
printf "\n\n"
diff --git a/resources/utilities/grub-assemble/grub_memdisk_keymap b/resources/utilities/grub-assemble/grub_memdisk_keymap
index df25a0f..0893c4c 100755
--- a/resources/utilities/grub-assemble/grub_memdisk_keymap
+++ b/resources/utilities/grub-assemble/grub_memdisk_keymap
@@ -24,5 +24,5 @@ set -u -e
for keymap in $(ls keymap/original)
do
- printf "/boot/grub/layouts/$keymap.gkb=keymap/$keymap.gkb "
+ printf "/boot/grub/layouts/$keymap.gkb=keymap/${keymap}.gkb "
done