mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Meta: Allow specifying custom grub config file for build-image-grub.sh
This allows passing a custom grub config file as second argument to build-image-grub.sh.
This commit is contained in:
parent
cdbd878a14
commit
5b1edc0678
Notes:
sideshowbarker
2024-07-18 21:50:01 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/5b1edc06782 Pull-request: https://github.com/SerenityOS/serenity/pull/5562
1 changed files with 9 additions and 3 deletions
|
@ -97,12 +97,18 @@ echo "done"
|
|||
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
"$script_path/build-root-filesystem.sh"
|
||||
|
||||
echo "installing grub using $grub..."
|
||||
if [ -z "$2" ]; then
|
||||
grub_cfg="$SERENITY_ROOT"/Meta/grub-"${partition_scheme}".cfg
|
||||
else
|
||||
grub_cfg=$2
|
||||
fi
|
||||
|
||||
echo "installing grub using $grub with $grub_cfg..."
|
||||
$grub --boot-directory=mnt/boot --target=i386-pc --modules="ext2 part_msdos" "${dev}"
|
||||
|
||||
if [ -d mnt/boot/grub2 ]; then
|
||||
cp "$SERENITY_ROOT"/Meta/grub-"${partition_scheme}".cfg mnt/boot/grub2/grub.cfg
|
||||
cp "$grub_cfg" mnt/boot/grub2/grub.cfg
|
||||
else
|
||||
cp "$SERENITY_ROOT"/Meta/grub-"${partition_scheme}".cfg mnt/boot/grub/grub.cfg
|
||||
cp "$grub_cfg" mnt/boot/grub/grub.cfg
|
||||
fi
|
||||
echo "done"
|
||||
|
|
Loading…
Reference in a new issue