From 331292999a20dd39c38783862eb7ae62d587d4fa Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 23 Nov 2018 09:59:42 +0100 Subject: bin/wtf: do not lib/load-configuration - we only need the base_dir --- bin/wtf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'bin') 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 ' -- cgit v1.2.3-70-g09d2