diff options
-rw-r--r-- | functions | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -507,7 +507,7 @@ add_binary() { # $2: destination on initcpio (optional, defaults to same as source) local -a sodeps - local line= regex= binary= dest= mode= sodep= resolved= dirname= + local line= regex= binary= dest= mode= sodep= resolved= if [[ ${1:0:1} != '/' ]]; then binary=$(type -P "$1") @@ -545,9 +545,7 @@ add_binary() { add_file "$sodep" "$sodep" "$(stat -c %a "$sodep")" else resolved=$(readlink -e "$sodep") - dirname=${resolved%/*} - add_dir "$dirname" 755 - add_symlink "$sodep" "$resolved" + add_symlink "$sodep" "$(readlink "$sodep")" add_file "$resolved" "$resolved" 755 fi fi |