summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--src/chroot-tools/chroot.conf3
-rw-r--r--src/lib/conf.sh.in2
-rw-r--r--src/lib/messages.sh7
-rw-r--r--src/librefetch/librefetch.conf3
-rw-r--r--src/libretools.conf2
-rw-r--r--src/xbs-abs/xbs-abs.conf3
-rw-r--r--src/xbs/xbs.conf3
8 files changed, 32 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5e83abc..e7b35e4 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,17 @@ $(eval $(foreach verb,$(nested.targets),$(foreach pkg,$(pkgs),\
$(outdir)/check:
cd $(@D)/test && ./testenv $(TESTENVFLAGS) roundup
+$(outdir)/shellcheck: private shellcheck.flags = --exclude=1090,1091,2016,2059,2064,2164,2191
+$(outdir)/shellcheck: private shellcheck.prune = -false
+$(outdir)/shellcheck: private shellcheck.prune += -o -type d -name doc
+$(outdir)/shellcheck: private shellcheck.prune += -o -type d -name man
+$(outdir)/shellcheck: private shellcheck.prune += -o -type f -name indent
+$(outdir)/shellcheck: private shellcheck.prune += -o -type f -name Makefile
+$(outdir)/shellcheck: private shellcheck.prune += -o -type f -name makepkg.gen
+$(outdir)/shellcheck: private shellcheck.prune += -o -type f -name source.sh.gen
+$(outdir)/shellcheck:
+ cd $(@D)/test && ./testenv $(TESTENVFLAGS) 'cd "$$TMPDIR/destdir" && find \( $(shellcheck.prune) \) -prune -o -not -type d -exec shellcheck $(shellcheck.flags) {} +'
+
_po_rule = \
po/%(pkg).pot: $(addsuffix /everything.pot,$(pkg.%(pkg))); \
cat $^ | msguniq -Fi --to-code=UTF-8 > '$@'
diff --git a/src/chroot-tools/chroot.conf b/src/chroot-tools/chroot.conf
index 3b3c445..4e3fce5 100644
--- a/src/chroot-tools/chroot.conf
+++ b/src/chroot-tools/chroot.conf
@@ -1,3 +1,6 @@
+#!/hint/bash
+# shellcheck disable=2034
+
# The full path to the chroot is
# $CHROOTDIR/$CHROOT/$COPY
# where $COPY is set at runtime.
diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in
index 30469ca..095c4f1 100644
--- a/src/lib/conf.sh.in
+++ b/src/lib/conf.sh.in
@@ -199,6 +199,7 @@ unset_PKGBUILD() {
# For each arg, `unset -v` all variables matching ${arg} and ${arg}_*
local v
for v in "$@"; do
+ # shellcheck disable=228
unset -v "$v" $(declare -p|sed -rn "s/^declare -\S+ (${v}_[a-zA-Z0-9_]*)=.*/\1/p")
done
}
@@ -237,6 +238,7 @@ unset_PKGBUILD() {
load_PKGBUILD() {
local file=${1:-./PKGBUILD}
unset_PKGBUILD
+ # shellcheck disable=2034
CARCH="$(get_var makepkg CARCH "`uname -m`")"
. "$file"
pkgbase=${pkgbase:-${pkgname[0]}}
diff --git a/src/lib/messages.sh b/src/lib/messages.sh
index 2dc53d6..15dc9d0 100644
--- a/src/lib/messages.sh
+++ b/src/lib/messages.sh
@@ -169,8 +169,11 @@ term_title() {
[[ $# -ge 1 ]] || panic
local fmt=''
case "$TERM" in
- screen|tmux) fmt='\ek%s\e\\';;
- xterm*|rxvt*) fmt='\e]0;%s\a';;
+ screen|tmux)
+ # shellcheck disable=1003
+ fmt='\ek%s\e\\';;
+ xterm*|rxvt*)
+ fmt='\e]0;%s\a';;
esac
printf "$fmt" "$(printf -- "$@")"
}
diff --git a/src/librefetch/librefetch.conf b/src/librefetch/librefetch.conf
index 7251ff3..d92683f 100644
--- a/src/librefetch/librefetch.conf
+++ b/src/librefetch/librefetch.conf
@@ -1,3 +1,6 @@
+#!/hint/bash
+# shellcheck disable=2034
+
MIRRORS=(
'https://repo.parabola.nu/sources/'
'https://repo.parabola.nu/other/'
diff --git a/src/libretools.conf b/src/libretools.conf
index 2332530..e601465 100644
--- a/src/libretools.conf
+++ b/src/libretools.conf
@@ -1,4 +1,5 @@
#!/hint/bash
+# shellcheck disable=2034
################################################################################
# misc #
@@ -12,6 +13,7 @@ BLACKLIST=https://git.parabola.nu/blacklist.git/plain/blacklist.txt
## Diff tool (vimdiff, gvimdiff, meld, etc)
## Used by `aur`, `diff-unfree`
+# shellcheck disable=2046
DIFFPROG=$(which $([ -z "${DISPLAY:-}" ]||echo kdiff3 meld gvimdiff) vimdiff colordiff diff 2>/dev/null|sed 's/\s.*//;1q')
## The architectures you'll be packaging for
diff --git a/src/xbs-abs/xbs-abs.conf b/src/xbs-abs/xbs-abs.conf
index 6b1585f..f8a5bf9 100644
--- a/src/xbs-abs/xbs-abs.conf
+++ b/src/xbs-abs/xbs-abs.conf
@@ -1,3 +1,6 @@
+#!/hint/bash
+# shellcheck disable=2034
+
SVNDIR=/var/lib/xbs-abs
#SVNUSER=
diff --git a/src/xbs/xbs.conf b/src/xbs/xbs.conf
index 556c133..2c94ca8 100644
--- a/src/xbs/xbs.conf
+++ b/src/xbs/xbs.conf
@@ -1 +1,4 @@
+#!/hint/bash
+# shellcheck disable=2034
+
BUILDSYSTEM=abslibre