From def5f7687e5f740504ee2474f621b769e58ad195 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 19 Dec 2014 12:04:00 +0100 Subject: [PATCH] usbinstall.sh: support for detecting system arch and blessing the corresponding grub EFI image --- src/usbinstall.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/usbinstall.sh b/src/usbinstall.sh index 6f27e90..6a3ea3a 100644 --- a/src/usbinstall.sh +++ b/src/usbinstall.sh @@ -377,7 +377,14 @@ fi set_pbar 85 cp -a $MOUNTDIR_EFI/EFI $MOUNTDIR_EFI_MAC -hfs-bless $MOUNTDIR_EFI_MAC/EFI/BOOT/bootia32.efi +TARGET_ARCH=`cat $MOUNTDIR/etc/openmamba-release | sed "s|.*for \(.*\) .*|\1|"` +[ "$TARGET_ARCH" ] || ARCH=i586 + +if [ "$TARGET_ARCH" = "x86_64" ]; then + hfs-bless $MOUNTDIR_EFI_MAC/EFI/BOOT/bootia32.efi +else + hfs-bless $MOUNTDIR_EFI_MAC/EFI/BOOT/bootx64.efi +fi set_status $"Writing bootloader..." echo $"Writing bootloader..."