]>
git.ipfire.org Git - thirdparty/systemd.git/blob - tools/find-build-dir.sh
3 # Try to guess the build directory:
4 # we look for subdirectories of the parent directory that look like ninja build dirs.
6 if [ -n "$BUILD_DIR" ]; then
7 echo "$(realpath "$BUILD_DIR")"
11 root
="$(dirname "$
(realpath
"$0")")"
14 for i
in "$root"/..
/*/build.ninja
; do
16 [ -d "$c" ] ||
continue
17 [ "$(basename "$c")" != mkosi.builddir
] ||
continue
19 if [ -n "$found" ]; then
20 echo 'Found multiple candidates, specify build directory with $BUILD_DIR' >&2
26 if [ -z "$found" ]; then
27 echo 'Specify build directory with $BUILD_DIR' >&2
31 echo "$(realpath $found)"