1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-24 08:00:05 -07:00
This commit is contained in:
Dylan Araps 2021-10-05 07:37:01 +03:00
parent 7cb70f67ec
commit 764acdcde7
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

15
kiss
View File

@ -153,15 +153,14 @@ pkg_owner() {
resolve_path() {
_rpath=$KISS_ROOT/${1#/}
# Attempt to resolve symlinks by using 'cd'.
# If this fails, fallback to the file's parent
# directory.
cd -P "${_rpath%/*}" 2>/dev/null || PWD=${_rpath%/*}
# Final resolved path.
_rpath=${PWD#"$KISS_ROOT"}/${_rpath##*/}
if cd -P "${_rpath%/*}" 2>/dev/null; then
_parent=$PWD
cd "$OLDPWD"
else
_parent=${_rpath%/*}
fi
_rpath=${_parent#"$KISS_ROOT"}/${_rpath##*/}
}
run_hook() {