update_file function fix
authorJacek Konieczny <jajcus@jajcus.net>
Sun, 4 Nov 2012 09:28:12 +0000 (10:28 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Sun, 4 Nov 2012 09:28:12 +0000 (10:28 +0100)
it would ignore the 'destination' argument

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.059263 seconds and 4 git commands to generate.