aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rwxr-xr-xinstall14
1 files changed, 14 insertions, 0 deletions
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 <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
+exec install -Dm755 "$@" -t "${DESTDIR}${sbindir}" "target/${target}/mqttr"