blob: 098ad3f3a1d240d9243c9d5fab91c059902fa9ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
# SPDX-FileCopyrightText: 2025 Tomasz Kramkowski <tomasz@kramkow.ski>
# SPDX-License-Identifier: CC0-1.0
# Usage: [DESTDIR=...] [prefix=...] [sbindir=...] [target=...] ./install [options]
# (contrived) e.g. DESTDIR=/tmp/mqttr target=debug ./install -s
# The variable casing/naming is a silly historical makefile convention.
# Defaults:
: "${DESTDIR=}" "${prefix=/usr/local}" "${sbindir=$prefix/sbin}" "${target=release}"
set -u
install -d "${DESTDIR}${sbindir}"
install "$@" "target/${target}/mqttr" "${DESTDIR}${sbindir}"
|