From 0036d6e15f9f8935507c0c30391254b4a46d35b6 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sat, 22 Nov 2014 01:02:41 -0500 Subject: build: Only generate the GRUB configurations once Should speed up the build process a little bit. --- (limited to 'buildrom-withgrub') diff --git a/buildrom-withgrub b/buildrom-withgrub index 99af39f..20f28f0 100755 --- a/buildrom-withgrub +++ b/buildrom-withgrub @@ -66,21 +66,8 @@ do # copy the images based on the keymap cp "$1"_"$romtype".rom "$1"_"$keymap"_"$romtype".rom - # generate the correct grub config - touch grub_"$keymap"_"$romtype".cfg - # generate contents: - cat ../resources/grub/config/extra/common.cfg >> grub_"$keymap"_"$romtype".cfg - cat ../resources/grub/config/extra/"$romtype".cfg >> grub_"$keymap"_"$romtype".cfg - echo "keymap $keymap" >> grub_"$keymap"_"$romtype".cfg - cat ../resources/grub/config/menuentries/common.cfg >> grub_"$keymap"_"$romtype".cfg - cat ../resources/grub/config/menuentries/"$romtype".cfg >> grub_"$keymap"_"$romtype".cfg - # Insert grub config into the image ./util/cbfstool/cbfstool "$1"_"$keymap"_"$romtype".rom add -f grub_"$keymap"_"$romtype".cfg -n grub.cfg -t raw - - # grubtest.cfg should be able to switch back to grub.cfg - sed 's/grubtest.cfg/grub.cfg/' < grub_"$keymap"_"$romtype".cfg > grub_"$keymap"_"$romtype"_test.cfg - # Insert grub test config into the image (for the user to test modifications to before modifying the main one) ./util/cbfstool/cbfstool "$1"_"$keymap"_"$romtype".rom add -f grub_"$keymap"_"$romtype"_test.cfg -n grubtest.cfg -t raw done @@ -91,9 +78,6 @@ done # Now we clean up and prepare the bin directory containing all the images # ---------------------------------------------------------------------------------------------------------------------------- -# we don't need the grub configs anymore -rm -rf grub*cfg - # prepare directory for new ROM images rm -rf "$1" mkdir "$1" -- cgit v0.9.1