mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
mkosi: make use of BUILDDIR if it is set
This way, the new "mkosi.builddir" support proposed in PR: https://github.com/systemd/mkosi/pull/114 will be made use of automatically.
This commit is contained in:
parent
c387cc49d9
commit
70e760e3a7
2
.gitignore
vendored
2
.gitignore
vendored
@ -49,6 +49,8 @@
|
|||||||
/localectl
|
/localectl
|
||||||
/loginctl
|
/loginctl
|
||||||
/machinectl
|
/machinectl
|
||||||
|
/mkosi.builddir/
|
||||||
|
/mkosi.cache/
|
||||||
/mtd_probe
|
/mtd_probe
|
||||||
/networkctl
|
/networkctl
|
||||||
/scsi_id
|
/scsi_id
|
||||||
|
16
mkosi.build
16
mkosi.build
@ -20,15 +20,19 @@
|
|||||||
# This is a build script for OS image generation using mkosi (https://github.com/systemd/mkosi).
|
# This is a build script for OS image generation using mkosi (https://github.com/systemd/mkosi).
|
||||||
# Simply invoke "mkosi" in the project directory to build an OS image.
|
# Simply invoke "mkosi" in the project directory to build an OS image.
|
||||||
|
|
||||||
|
# If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it
|
||||||
|
# as out-of-tree build dir. Otherwise, let's make up our own builddir.
|
||||||
|
[ -z "$BUILDDIR" ] && BUILDDIR=build
|
||||||
|
|
||||||
export LC_CTYPE=C.UTF-8
|
export LC_CTYPE=C.UTF-8
|
||||||
meson build
|
test -f "$BUILDDIR"/build.ninja || meson "$BUILDDIR"
|
||||||
ninja -C build all
|
ninja -C "$BUILDDIR" all
|
||||||
ninja -C build test
|
ninja -C "$BUILDDIR" test
|
||||||
ninja -C build install
|
ninja -C "$BUILDDIR" install
|
||||||
|
|
||||||
mkdir -p $DESTDIR/etc
|
mkdir -p "$DESTDIR"/etc
|
||||||
|
|
||||||
cat > $DESTDIR/etc/issue <<EOF
|
cat > "$DESTDIR"/etc/issue <<EOF
|
||||||
\S (built from systemd tree)
|
\S (built from systemd tree)
|
||||||
Kernel \r on an \m (\l)
|
Kernel \r on an \m (\l)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user