aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-11 14:36:25 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-11 14:36:25 +0200
commitea843ed1bcc863ba8aef8fa972ce0732f386e550 (patch)
tree87c9e37a4f70e99cfc9c50402b20d93e5ba50f46
parent4234b4cb392c0e70085edfbc80585fb9476629f9 (diff)
Make shellcheck happy
-rw-r--r--Makefile2
-rwxr-xr-xbin/bashtard16
-rw-r--r--lib/util.bash3
3 files changed, 15 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5b3436d..1d59200 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@ man:
qa:
reuse lint
- shellcheck bin/bashtard **/*.bash
+ shellcheck -x bin/bashtard **/*.bash
share:
mkdir -pv -- "$(DESTDIR)/share/bashtard"
diff --git a/bin/bashtard b/bin/bashtard
index 2f14d02..cfe4d00 100755
--- a/bin/bashtard
+++ b/bin/bashtard
@@ -4,11 +4,17 @@
#
# SPDX-License-Identifier: AGPL-3.0-or-later
-export BASHTARD_BIN="$0"
-export BASHTARD_NAME="$(basename "$0")"
-export BASHTARD_ETCDIR="/etc/$BASHTARD_NAME"
-export BASHTARD_LIBDIR="$(CDPATH="" cd -- "$(dirname -- "$0")/.." && pwd -P)/lib"
-export BASHTARD_SHAREDIR="$(CDPATH="" cd -- "$(dirname -- "$0")/.." && pwd -P)/share"
+BASHTARD_BIN="$0"
+BASHTARD_NAME="$(basename "$0")"
+BASHTARD_ETCDIR="/etc/$BASHTARD_NAME"
+BASHTARD_LIBDIR="$(CDPATH="" cd -- "$(dirname -- "$0")/.." && pwd -P)/lib"
+BASHTARD_SHAREDIR="$(CDPATH="" cd -- "$(dirname -- "$0")/.." && pwd -P)/share"
+
+export BASHTARD_BIN
+export BASHTARD_NAME
+export BASHTARD_ETCDIR
+export BASHTARD_LIBDIR
+export BASHTARD_SHAREDIR
main() {
if ! command -v bash > /dev/null
diff --git a/lib/util.bash b/lib/util.bash
index 8a119f2..da491bb 100644
--- a/lib/util.bash
+++ b/lib/util.bash
@@ -4,8 +4,11 @@
#
# SPDX-License-Identifier: AGPL-3.0-or-later
+# shellcheck source=lib/util/config.bash
. "$BASHTARD_LIBDIR/util/config.bash"
+# shellcheck source=lib/util/pkg.bash
. "$BASHTARD_LIBDIR/util/pkg.bash"
+# shellcheck source=lib/util/svc.bash
. "$BASHTARD_LIBDIR/util/svc.bash"
# Change the working directory. In usage, this is the same as using cd,