#
# Revision history:
#
+# 0.6.9 -- Install gptsync on Macs if evidence of Windows found
+# 0.6.8 -- Bug fix: ESP scan now uses "uniq".
# 0.6.6 -- Bug fix: Upgrade drivers when installed to EFI/BOOT. Also enable
# copying shim.efi and MokManager.efi over themselves.
# 0.6.4 -- Copies ext2 driver rather than ext4 driver for ext2/3fs
fi
}
+# Copy tools (currently only gptsync, and that only on Macs) to the EFI/tools
+# directory on the ESP. Must be passed a suitable architecture code (ia32
+# or x64).
+CopyTools() {
+ mkdir -p $InstallDir/EFI/tools
+ if [[ $OSName == 'Darwin' ]] ; then
+ cp -f $RefindDir/tools_$1/gptsync_$1.efi $InstallDir/EFI/tools/
+ fi
+} # CopyTools()
+
# Copy the rEFInd files to the ESP or OS X root partition.
# Sets Problems=1 if any critical commands fail.
CopyRefindFiles() {
elif [[ $Upgrade == 1 ]] ; then
if [[ $Platform == 'EFI64' ]] ; then
CopyDrivers x64
+ CopyTools x64
else
CopyDrivers ia32
+ CopyTools ia32
fi
fi
Refind=""
Problems=1
fi
CopyDrivers x64
+ CopyTools x64
Refind="refind_x64.efi"
CopyKeys
if [[ $ShimSource != "none" ]] ; then
Problems=1
fi
CopyDrivers ia32
+ CopyTools ia32
Refind="refind_ia32.efi"
else
echo "Unknown platform! Aborting!"
fi
InstallDir=`echo $EspLine | cut -d " " -f 6`
if [[ -n $InstallDir ]] ; then
- EspFilesystem=`grep $InstallDir /etc/mtab | cut -d " " -f 3`
+ EspFilesystem=`grep $InstallDir /etc/mtab | uniq | cut -d " " -f 3`
fi
if [[ $EspFilesystem != 'vfat' ]] ; then
echo "$RootDir/boot/efi doesn't seem to be on a VFAT filesystem. The ESP must be"