2024-09-22 01:29:15 +08:00
|
|
|
#!/bin/bash
|
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
|
|
|
|
MKOSI_CONFIG="$(mkosi --json summary | jq -r .Images[-1])"
|
|
|
|
DISTRIBUTION="$(jq -r .Distribution <<< "$MKOSI_CONFIG")"
|
|
|
|
RELEASE="$(jq -r .Release <<< "$MKOSI_CONFIG")"
|
|
|
|
ARCH="$(jq -r .Architecture <<< "$MKOSI_CONFIG")"
|
|
|
|
|
|
|
|
exec mkosi \
|
|
|
|
--incremental=strict \
|
2024-11-01 20:05:46 +08:00
|
|
|
--build-sources-ephemeral=no \
|
2024-09-22 01:29:15 +08:00
|
|
|
--format=none \
|
|
|
|
build \
|
|
|
|
clangd \
|
|
|
|
--compile-commands-dir=/work/build \
|
|
|
|
--path-mappings="\
|
|
|
|
$(pwd)=/work/src,\
|
|
|
|
$(pwd)/build/mkosi.builddir/$DISTRIBUTION~$RELEASE~$ARCH/=/work/build,\
|
|
|
|
$(pwd)/build/mkosi.cache/$DISTRIBUTION~$RELEASE~$ARCH~build.cache/usr/include/=/usr/include" \
|
|
|
|
"$@"
|
|
|
|
|