wp-uninstalled: try to find the build directory

Search for the first build.ninja file and only if that fails default to
the current build/.
This commit is contained in:
Peter Hutterer 2021-10-15 14:03:37 +10:00 committed by George Kiagiadakis
parent 52aaf96179
commit 7970e4c75b

View file

@ -8,7 +8,7 @@ if [ -z "@MESON@" ]; then
BUILDDIR="@MESON_BUILD_ROOT@"
else
SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BUILDDIR=${SOURCEDIR}/build
BUILDDIR=$(find "${SOURCEDIR}" -maxdepth 2 -name build.ninja -printf "%h\n" -quit 2>/dev/null || echo "${SOURCEDIR}/build")
fi
CONFIGDIR=config