summaryrefslogtreecommitdiffstats
path: root/resources/utilities/grub-assemble/gen.sh
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/grub-assemble/gen.sh
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/grub-assemble/gen.sh')
-rwxr-xr-xresources/utilities/grub-assemble/gen.sh36
1 files changed, 18 insertions, 18 deletions
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"