summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-23 09:59:42 +0100
committerErich Eckner <git@eckner.net>2018-11-23 09:59:42 +0100
commit331292999a20dd39c38783862eb7ae62d587d4fa (patch)
treeb946749ce22cabd6a9f1ffc05caaeeafd414c008
parent6cccbace7755ff7c195fc9f4dcfc9d0b3f32209f (diff)
downloadbuilder-331292999a20dd39c38783862eb7ae62d587d4fa.tar.xz
bin/wtf: do not lib/load-configuration - we only need the base_dir
-rwxr-xr-xbin/wtf11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/wtf b/bin/wtf
index 232ffe7..b87a41f 100755
--- a/bin/wtf
+++ b/bin/wtf
@@ -1,9 +1,8 @@
#!/bin/sh
-# shellcheck disable=SC2119,SC2120
-
-# shellcheck source=../lib/load-configuration
-. "${0%/*}/../lib/load-configuration"
+base_dir=$(
+ readlink -f "${0%/*}/.."
+)
# TODO: search i486, too
@@ -13,9 +12,9 @@ pkgfile -wC "${base_dir}/misc/pacman-i686.conf" -s "${search##*/}" | \
xargs -rn1 pkgfile -wC "${base_dir}/misc/pacman-i686.conf" -l | \
if printf '%s\n' "${search}" | \
grep -q '^/'; then
- grep -w "${search}" || true
+ grep -w "${search}"
else
- grep "/${search}\\(/\\|\$\\)" || true
+ grep "/${search}\\(/\\|\$\\)"
fi | \
sort -k2,2 | \
sed '