]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - tools/find-build-dir.sh
oss-fuzz: turn on the pointer-overflow check
[thirdparty/systemd.git] / tools / find-build-dir.sh
index 06b6297ea5d91efd2349b90c941f473d7073cb0e..fb8a1c17a371a150d0d50990d1c975a5f12e4ad7 100755 (executable)
@@ -5,28 +5,28 @@ set -e
 # we look for subdirectories of the parent directory that look like ninja build dirs.
 
 if [ -n "$BUILD_DIR" ]; then
-        echo "$(realpath "$BUILD_DIR")"
-        exit 0
+    echo "$(realpath "$BUILD_DIR")"
+    exit 0
 fi
 
 root="$(dirname "$(realpath "$0")")"
 
 found=
 for i in "$root"/../*/build.ninja; do
-        c="$(dirname $i)"
-        [ -d "$c" ] || continue
-        [ "$(basename "$c")" != mkosi.builddir ] || continue
+    c="$(dirname $i)"
+    [ -d "$c" ] || continue
+    [ "$(basename "$c")" != mkosi.builddir ] || continue
 
-        if [ -n "$found" ]; then
-                echo 'Found multiple candidates, specify build directory with $BUILD_DIR' >&2
-                exit 2
-        fi
-        found="$c"
+    if [ -n "$found" ]; then
+        echo 'Found multiple candidates, specify build directory with $BUILD_DIR' >&2
+        exit 2
+    fi
+    found="$c"
 done
 
 if [ -z "$found" ]; then
-        echo 'Specify build directory with $BUILD_DIR' >&2
-        exit 1
+    echo 'Specify build directory with $BUILD_DIR' >&2
+    exit 1
 fi
 
 echo "$(realpath $found)"