]> code.delx.au - refind/blobdiff - mvrefind
Fix for refind-install script to handle a wider range of disk devices,
[refind] / mvrefind
index 1446e4cd7badfc62c1f137e48b2e35bc6324af64..4c2a66f7e48f94ec0e8a8902683d3219cf754546 100755 (executable)
--- a/mvrefind
+++ b/mvrefind
@@ -1,7 +1,15 @@
 #!/bin/bash
 #
-# Linux script to move an existing rEFInd installation from one directory to another
+# Linux script to move an existing rEFInd installation from one directory to
+# another
 #
+# copyright (c) 2013-2015 by Roderick W. Smith
+#
+# This program is licensed under the terms of the GNU GPL, version 3,
+# or (at your option) any later version.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
 # Usage:
 #
 # ./mvrefind /path/to/source /path/to/destination
@@ -12,6 +20,7 @@
 #
 # Revision history:
 #
+# 0.10.2  -- Fixed bug in moving bootmgfw.efi in some situations
 # 0.10.1  -- Generalized to support ARM64 (aka AARCH64, aa64)
 # 0.10.0  -- Renamed from mvrefind.sh to mvrefind
 # 0.6.3   -- Initial release
@@ -181,7 +190,7 @@ MoveFiles() {
    fi
 
    if [[ $EspTargetDir == "/efi/microsoft/boot" && -d $TargetDir ]] ; then
-      mv -n $EspTargetDir/bootmgfw.efi $InstallDir/EFI/Microsoft/
+      mv -n $TargetDir/bootmgfw.efi $InstallDir/EFI/Microsoft/
    fi
 
    mkdir -p $TargetDir
@@ -234,7 +243,7 @@ AddNvramEntry() {
    fi
 
    if [[ $InstallIt == "1" ]] ; then
-      if [[ $EfiTargetDir == "/efi/microsoft/boot" ]] ; then
+      if [[ $EspTargetDir == "/efi/microsoft/boot" ]] ; then
          # Name it the way some firmware expects -- see http://mjg59.dreamwidth.org/20187.html
          $Efibootmgr -c -l $EfiEntryFilename -L "Windows Boot Manager" -d $InstallDisk -p $PartNum &> /dev/null
       else