Debian Codegraph @

tools/build-on-openbsd

raw symbols SCIP
1 #!/bin/sh
2 # This script provides a quick and dirty way of building and installing
3 # cloud-init on OpenBSD.
4
5 set -eux
6
7 fail() {
8 echo "FAILED:" "$@" 1>&2
9 exit 1
10 }
11
12 PYTHON=${PYTHON:-python3}
13 if ! command -v ${PYTHON} > /dev/null 2>&1; then
14 echo "Please install python first."
15 exit 1
16 fi
17
18 # Check dependencies:
19 depschecked=/tmp/c-i.dependencieschecked
20 [ -f "$depschecked" ] || ./tools/read-dependencies --distro openbsd -t || fail "install packages"
21 touch "$depschecked"
22
23 # Build the code and install in /usr/local/:
24 meson setup builddir -Dinit_system=sysvinit_openbsd -Dsysconfdir=/etc
25 meson install -C builddir
26
27 echo "Installation completed."