1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-11-13 18:25:17 -07:00

kiss: fix masking local source as remote, closes #70 (#73)

This commit is contained in:
Wolf Gupta 2022-09-17 22:24:47 +05:30 committed by GitHub
parent 36df1ae0e5
commit 15c89f6423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

16
kiss
View File

@ -360,14 +360,18 @@ pkg_source_resolve() {
_des=$src_dir/$1/${3:+"$3/"}${2##*/}
_des=${_des%[@#]*}/
# Remote source (cached).
elif [ -f "$src_dir/$1/${3:+"$3/"}${2##*/}" ]; then
_res=$src_dir/$1/${3:+"$3/"}${2##*/}
# Remote source.
elif null "${2##*://*}"; then
_res=url+$2
_des=$src_dir/$1/${3:+"$3/"}${2##*/}
# Remote source (cached).
# Only check if we detect a remote source to avoid
# masking local paths like 'files/test' as cached
# if '$src_dir/$1/test' is present
if [ -f "$src_dir/$1/${3:+"$3/"}${2##*/}" ]; then
_res=$src_dir/$1/${3:+"$3/"}${2##*/}
else
_res=url+$2
_des=$src_dir/$1/${3:+"$3/"}${2##*/}
fi
# Local relative dir.
elif [ -d "$repo_dir/$2" ]; then