]> git.pld-linux.org Git - packages/efi-boot-update.git/blobdiff - efi-boot-update
update_file function fix
[packages/efi-boot-update.git] / efi-boot-update
index 0684182c8b82f9a464b52a651c2590809dc30c0a..ec420f73134d7d9e53af2c44dcf51a335fa3d9e3 100755 (executable)
@@ -66,11 +66,18 @@ update_file () {
         esac
     done
     src="$1"; shift
-    dst="$2"; shift
+    dst="$1"; shift
     if [ -n "$*" ] ; then
         msg "update_file: unexpected arguments: $*"
         return 1
     fi
+    if [ -z "$src" ] ; then
+        msg "update_file: no source file"
+        return 1
+    fi
+    if [ -z "$dst" ] ; then
+        dst=`basename "$src"`
+    fi
     if [ "${dst#/}" = "${dst}" ] ; then
         # relative path
         dst="$DESTDIR/$dst"
This page took 0.075879 seconds and 4 git commands to generate.