]>
Commit | Line | Data |
---|---|---|
bb557f90 | 1 | #!/bin/sh -ex |
1b0ff615 LP |
2 | |
3 | # This file is part of systemd. | |
4 | # | |
5 | # Copyright 2016 Lennart Poettering | |
6 | # | |
7 | # systemd is free software; you can redistribute it and/or modify it | |
8 | # under the terms of the GNU Lesser General Public License as published by | |
9 | # the Free Software Foundation; either version 2.1 of the License, or | |
10 | # (at your option) any later version. | |
11 | # | |
12 | # systemd is distributed in the hope that it will be useful, but | |
13 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU Lesser General Public License | |
18 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | # This is a build script for OS image generation using mkosi (https://github.com/systemd/mkosi). | |
21 | # Simply invoke "mkosi" in the project directory to build an OS image. | |
22 | ||
70e760e3 LP |
23 | # If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it |
24 | # as out-of-tree build dir. Otherwise, let's make up our own builddir. | |
25 | [ -z "$BUILDDIR" ] && BUILDDIR=build | |
26 | ||
848d875f | 27 | export LC_CTYPE=C.UTF-8 |
9400405b LP |
28 | |
29 | [ -f "$BUILDDIR"/build.ninja ] || meson "$BUILDDIR" | |
70e760e3 | 30 | ninja -C "$BUILDDIR" all |
a818a2ae | 31 | [ "$WITH_TESTS" = 0 ] || ninja -C "$BUILDDIR" test |
70e760e3 | 32 | ninja -C "$BUILDDIR" install |
6344a7eb | 33 | |
70e760e3 | 34 | mkdir -p "$DESTDIR"/etc |
6344a7eb | 35 | |
70e760e3 | 36 | cat > "$DESTDIR"/etc/issue <<EOF |
6344a7eb LP |
37 | \S (built from systemd tree) |
38 | Kernel \r on an \m (\l) | |
39 | ||
40 | EOF |