diff --git a/tinyramfs b/tinyramfs index ecae6af..8094db5 100755 --- a/tinyramfs +++ b/tinyramfs @@ -179,11 +179,13 @@ copy_binary() *) IFS=:; set -- $PATH; unset IFS + _binary="$binary" + for _dir; do - binary="${_dir}/${binary}" + binary="${_dir}/${_binary}" [ -x "$binary" ] && break - done || panic "$1 does not exist" + done || panic "$_binary does not exist" ;; esac