From 7a29b795824b8401c2b448cbea070d211591a136 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sun, 20 Jul 2025 14:09:23 +0100 Subject: Simple install script --- install | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 install (limited to 'install') diff --git a/install b/install new file mode 100755 index 0000000..aa3c632 --- /dev/null +++ b/install @@ -0,0 +1,14 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2025 Tomasz Kramkowski +# 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 +exec install -Dm755 "$@" -t "${DESTDIR}${sbindir}" "target/${target}/mqttr" -- cgit v1.2.3-70-g09d2