Browse Source
inst_dir used the following to try to resolve a relative path: [[ $target = ${target##*/} ]] && target="${file%/*}/$target" inst_dir $target This will only match if $target has no slashes, so something like /usr/bin -> ../sbin would result in: inst_dir ../sbin, or /usr/share -> local/share would result in: inst_dir local/share which is not going to do the right thing. Instead, we resolve any non-absolute link, like so: [[ $target == ${target#/} ]] && target=$(dirname "$file")/$target Thus /usr/bin -> ../sbin results in: inst_dir /usr/../sbin, and /usr/share -> local/share results in: inst_dir /usr/local/share which is what you would expect.master


1 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue