]> code.delx.au - refind/blobdiff - install.sh
Reverted rEFIt commit r472, since it's caused some existing BMP
[refind] / install.sh
index 93b4cdea8241fef03e7010075eb0253bf7e042ad..a95d30ee9d6c0a32872512542985f21a89f5b029 100755 (executable)
 # to the current OS X boot partition. Under Linux, this script
 # installs to the ESP by default.
 #
-# This program is copyright (c) 2012-2014 by Roderick W. Smith
+# This program is copyright (c) 2012-2015 by Roderick W. Smith
 # It is released under the terms of the GNU GPL, version 3,
 # a copy of which should be included in the file COPYING.txt.
 #
 # Revision history:
 #
+# 0.8.6   -- Fixed bugs that caused misidentification of ESP on disks with
+#            partition numbers over 10 on OS X and misidentification of mount
+#            point if already-mounted ESP had space in path.
 # 0.8.5   -- Refinement/cleanup of new OS X ESP-as-default policy
 # 0.8.4   -- OS X default changed to install to ESP under /EFI/BOOT
 # 0.7.9   -- Fixed bug that caused errors if dmraid utility not installed
@@ -399,6 +402,8 @@ CopyDrivers() {
               ;;
          hfsplus) DriverType="hfs"
               ;;
+         ntfs) DriverType="ntfs"
+              ;;
          *) BootFS=""
       esac
       if [[ -n $BootFS ]] ; then
@@ -597,8 +602,8 @@ MountOSXESP() {
    fi
    Esp=/dev/`echo $Temp`
    # If the ESP is mounted, use its current mount point....
-   Temp=`df -P | grep "$Esp"`
-   InstallDir=`echo $Temp | cut -f 6 -d ' '`
+   Temp=`df -P | grep "$Esp "`
+   InstallDir=`echo $Temp | cut -f 6- -d ' '`
    if [[ "$InstallDir" == '' ]] ; then
       mkdir /Volumes/ESP &> /dev/null
       mount -t msdos "$Esp" /Volumes/ESP
@@ -639,7 +644,7 @@ SetupMacHfs() {
         <key>ProductName</key>
         <string>rEFInd</string>
         <key>ProductVersion</key>
-        <string>0.7.6</string>
+        <string>0.8.5</string>
 </dict>
 </plist>
 ENDOFHERE
@@ -661,7 +666,7 @@ InstallOnOSX() {
    Platform=`ioreg -l -p IODeviceTree | grep firmware-abi | cut -d "\"" -f 4`
    CopyRefindFiles
    if [[ $InstallToEspOnMac == "1" ]] ; then
-      bless --mount "$InstallDir" --setBoot --file "$InstallDir/$TargetDir/$Refind"
+      bless --mount "$InstallDir" --setBoot --file "$InstallDir/$TargetDir/$Refind" --shortform
    elif [[ "$TargetDir" != "/EFI/BOOT" ]] ; then
       bless --setBoot --folder "$InstallDir/$TargetDir" --file "$InstallDir/$TargetDir/$Refind"
    fi
@@ -1089,11 +1094,6 @@ if [[ $OSName == 'Darwin' ]] ; then
       echo "The --localkeys option is not supported on OS X! Exiting!"
       exit 1
    fi
-   if [[ $InstallToEspOnMac == 1 ]] ; then
-      TargetDir=/EFI/BOOT
-      TargetX64="bootx64.efi"
-      TargetIA32="bootia32.efi"
-   fi
    InstallOnOSX $1
 elif [[ $OSName == 'Linux' ]] ; then
    InstallOnLinux