Verified Commit 21c32fd3 authored by nl6720's avatar nl6720
Browse files

functions: remove special handling of relative symbolic links from add_file...

functions: remove special handling of relative symbolic links from add_file and simply use add_symlink

Now that add_symlink preserves relative symlinks, there is no need for add_file to copy the symlinks.
All symbolic link handling is now left to the add_symlink function.
parent 28ed9a23
......@@ -644,13 +644,8 @@ add_file() {
mode="$(stat -c %a -- "$srcrealpath")"
add_file "$srcrealpath" "$srcrealpath" "$mode"
[[ -d "${BUILDROOT}${dest%/*}" ]] || install -d -- "${BUILDROOT}${dest%/*}"
if [[ "$src" == "$dest" ]]; then
# copy the symlink to preserve relativity
cp -adT -- "$src" "${BUILDROOT}${src}"
else
# create the symlink
add_symlink "$src" "$dest"
fi
# create the symlink
add_symlink "$src" "$dest"
else
command install -Dm$mode "$src" "$BUILDROOT$dest"
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment