From 560a435744bceba3580c9b1bec359d3ab0e0c4e1 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Sun, 4 Nov 2012 10:28:12 +0100 Subject: [PATCH] update_file function fix it would ignore the 'destination' argument --- efi-boot-update | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/efi-boot-update b/efi-boot-update index 0684182..ec420f7 100755 --- a/efi-boot-update +++ b/efi-boot-update @@ -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" -- 2.43.0