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