From 12c50f7939c02db85f05830c4b9fccf464b3977a Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Wed, 10 Jun 2015 20:30:48 -0400 Subject: all script: use a standard style Based on the style used for the script in resources/scripts/helpers/build/release/ --- (limited to 'resources/utilities/grub-assemble') 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 -- cgit v0.9.1