From 6b674f2c89247c35065b2141c48a38ebeb4e55ad Mon Sep 17 00:00:00 2001 From: NRK Date: Mon, 13 Sep 2021 23:09:25 +0600 Subject: use more posix complaint flags --- examples/rifle_sxiv.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/rifle_sxiv.sh') diff --git a/examples/rifle_sxiv.sh b/examples/rifle_sxiv.sh index b8a51a64..ec55b249 100755 --- a/examples/rifle_sxiv.sh +++ b/examples/rifle_sxiv.sh @@ -14,8 +14,10 @@ tmp="/tmp/sxiv_rifle_$$" listfiles () { - find -L "///${1%/*}" -maxdepth 1 -type f -iregex \ - '.*\.\(jpe?g\|png\|gif\|webp\|tiff\|bmp\)$' -print | sort | tee "$tmp" + find -L "///${1%/*}" \( ! -path "///${1%/*}" -prune \) -type f \ + \( -name '*.jpg' -o -name '*.jpeg' -o -name '*.png' -o -name '*.gif' \ + -o -name '*.webp' -o -name '*.tiff' -o -name '*.bmp' \) -print | + sort | tee "$tmp" } is_img () { -- cgit 1.4.1-2-gfad0