From: Jacek Konieczny Date: Sun, 4 Nov 2012 09:28:12 +0000 (+0100) Subject: update_file function fix X-Git-Tag: auto/th/efi-boot-update-0.1-1~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fefi-boot-update.git;a=commitdiff_plain;h=560a435744bceba3580c9b1bec359d3ab0e0c4e1 update_file function fix it would ignore the 'destination' argument --- 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"