]>
git.ipfire.org Git - thirdparty/systemd.git/blob - tools/find-build-dir.sh
79a79fcc58e4f866347e21e7c71f099173d83662
2 # SPDX-License-Identifier: LGPL-2.1-or-later
5 # Try to guess the build directory:
6 # we look for subdirectories of the parent directory that look like ninja build dirs.
8 if [ -n "${BUILD_DIR:=}" ]; then
13 root
="$(dirname "$
(realpath
"$0")")"
16 for i
in "$root"/..
/*/build.ninja
; do
18 [ -d "$c" ] ||
continue
19 [ "$(basename "$c")" != mkosi.builddir
] ||
continue
21 if [ -n "$found" ]; then
22 echo "Found multiple candidates, specify build directory with \$BUILD_DIR" >&2
28 if [ -z "$found" ]; then
29 echo "Specify build directory with \$BUILD_DIR" >&2