summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions6
1 files changed, 2 insertions, 4 deletions
diff --git a/functions b/functions
index 2e1ae3f..e213580 100644
--- a/functions
+++ b/functions
@@ -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