mirror of
https://github.com/bpkg/bpkg
synced 2024-11-16 00:12:52 +00:00
fix(lib/package/package.sh): emit real path 'bpkg_package_path'
This commit is contained in:
parent
4eff8f7192
commit
8595da906a
@ -58,20 +58,20 @@ find_file () {
|
||||
|
||||
## check if file exists at given path
|
||||
if test -f "$file"; then
|
||||
echo "$file"
|
||||
realpath "$file"
|
||||
return 0
|
||||
fi
|
||||
|
||||
## check if file exists joined with currrent path (cwd)
|
||||
if test -f "$path/$file"; then
|
||||
echo "$path/$file"
|
||||
realpath "$path/$file"
|
||||
return 0
|
||||
fi
|
||||
|
||||
## check if file exists in paths stopping at $HOME
|
||||
while [[ "$path" != "$HOME" && "$path" != "" ]]; do
|
||||
if test -f "$path/$file"; then
|
||||
echo "$path/$file"
|
||||
realpath "$path/$file"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user