diff options
Diffstat (limited to 'install')
-rwxr-xr-x | install | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -2,8 +2,10 @@ # 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 +# Usage: [DESTDIR=...] [prefix=...] [sbindir=...] [target=...] ./install +# (contrived) e.g. DESTDIR=/tmp/mqttr target=debug ./install +# Note: Yes, this is just `install` but more portable and less featureful. If you +# want the features of `install` then just use it. # The variable casing/naming is a silly historical makefile convention. @@ -11,5 +13,6 @@ : "${DESTDIR=}" "${prefix=/usr/local}" "${sbindir=$prefix/sbin}" "${target=release}" set -u -install -d "${DESTDIR}${sbindir}" -install "$@" "target/${target}/mqttr" "${DESTDIR}${sbindir}" +mkdir -p "${DESTDIR}${sbindir}" +rm -f "${DESTDIR}${sbindir}/mqttr" +cp "target/${target}/mqttr" "${DESTDIR}${sbindir}/mqttr" |