mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
pvscheck: Make realdir work with nonexistent directories
This commit is contained in:
@@ -302,8 +302,16 @@ create_compile_commands() {(
|
|||||||
# realpath is not available in Ubuntu trusty yet.
|
# realpath is not available in Ubuntu trusty yet.
|
||||||
realdir() {(
|
realdir() {(
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
cd "$dir"
|
local add=""
|
||||||
printf '%s\n' "$PWD"
|
while ! cd "$dir" 2>/dev/null ; do
|
||||||
|
add="${dir##*/}/$add"
|
||||||
|
local new_dir="${dir%/*}"
|
||||||
|
if test "$new_dir" = "$dir" ; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
dir="$new_dir"
|
||||||
|
done
|
||||||
|
printf '%s\n' "$PWD/$add"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
patch_sources() {(
|
patch_sources() {(
|
||||||
|
Reference in New Issue
Block a user