aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-11-09 15:00:48 -0500
committerCarl Dong <contact@carldong.me>2020-11-09 16:58:27 -0500
commit618cbd2c1a630a60bed9212718dce78fe5f50108 (patch)
treef3889e6876c55fc98c96b86cadc10d2504a1e7e9 /depends
parent6c7e8f067dcf4c5d793d162aeb84f074f9a14664 (diff)
lint: Also lint files with shellcheck directive
Files like config.site.in are not referenced by any other script in our tree, so we need to mark it manually with a "shellcheck shell=" directive and make sure that shellcheck is run on them.
Diffstat (limited to 'depends')
-rw-r--r--depends/config.site.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/depends/config.site.in b/depends/config.site.in
index d6835a2d85..c39975ecde 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -1,3 +1,13 @@
+# shellcheck shell=sh disable=SC2034 # Many variables set will be used in
+ # ./configure but shellcheck doesn't know
+ # that, hence: disable=SC2034
+
+true # Dummy command because shellcheck treats all directives before first
+ # command as file-wide, and we only want to disable for one line.
+ #
+ # See: https://github.com/koalaman/shellcheck/wiki/Directive
+
+# shellcheck disable=SC2154
depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)"
cross_compiling=maybe
@@ -50,7 +60,7 @@ if test x@host_os@ = xdarwin; then
fi
PATH=$depends_prefix/native/bin:$PATH
-PKG_CONFIG="`which pkg-config` --static"
+PKG_CONFIG="$(which pkg-config) --static"
# These two need to remain exported because pkg-config does not see them
# otherwise. That means they must be unexported at the end of configure.ac to