This is analogous to a change in mkosi[1] with the same motivation: some scripts are run to bootstrap the distribution tree and are thus running directly on the host system which may not have `/bin/bash` (e.g. NixOS). As with the `mkosi` change, do that for each shebang for consistency reasons. [1] https://github.com/systemd/mkosi/commit/8d2cd50e5192cada7211724ecff3514f0c85cf0f
19 lines
462 B
Bash
Executable File
19 lines
462 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
set -e
|
|
|
|
if [[ "$1" == "build" ]] || ((NO_BUILD)); then
|
|
exit 0
|
|
fi
|
|
|
|
if [[ ! -f "pkg/$PKG_SUBDIR/PKGBUILD" ]]; then
|
|
echo "PKGBUILD not found at pkg/$PKG_SUBDIR/PKGBUILD, run mkosi once with -ff to make sure the PKGBUILD is cloned" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# shellcheck source=/dev/null
|
|
_systemd_UPSTREAM=1 . "pkg/$PKG_SUBDIR/PKGBUILD"
|
|
|
|
# shellcheck disable=SC2154
|
|
mkosi-install "${makedepends[@]}"
|