diff options
author | Erich Eckner <git@eckner.net> | 2018-11-23 09:59:42 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-23 09:59:42 +0100 |
commit | 331292999a20dd39c38783862eb7ae62d587d4fa (patch) | |
tree | b946749ce22cabd6a9f1ffc05caaeeafd414c008 /bin | |
parent | 6cccbace7755ff7c195fc9f4dcfc9d0b3f32209f (diff) | |
download | builder-331292999a20dd39c38783862eb7ae62d587d4fa.tar.xz |
bin/wtf: do not lib/load-configuration - we only need the base_dir
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/wtf | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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 ' |