mirror of
https://github.com/systemd/systemd.git
synced 2025-03-11 20:58:27 +03:00
26 lines
576 B
Bash
Executable File
26 lines
576 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
set -e
|
|
|
|
if command -v flatpak-spawn >/dev/null; then
|
|
SPAWN=(flatpak-spawn --host)
|
|
else
|
|
SPAWN=()
|
|
fi
|
|
|
|
MKOSI_CONFIG="$("${SPAWN[@]}" mkosi --json summary | jq -r .Images[-1])"
|
|
BUILDDIR="$(jq -r .BuildDirectory <<< "$MKOSI_CONFIG")"
|
|
BUILDSUBDIR="$(jq -r .BuildSubdirectory <<< "$MKOSI_CONFIG")"
|
|
|
|
exec "${SPAWN[@]}" mkosi \
|
|
--rerun-build-scripts \
|
|
build \
|
|
-- \
|
|
clangd \
|
|
--compile-commands-dir=/work/build \
|
|
--path-mappings="\
|
|
$(pwd)=/work/src,\
|
|
$BUILDDIR/$BUILDSUBDIR=/work/build"\
|
|
"$@"
|
|
|