Fix imv-folder usage with sub-folders with images

See https://github.com/eXeC64/imv/pull/225#discussion_r494270357
This commit is contained in:
somini 2020-09-24 22:56:24 +01:00 committed by Harry Jeffery
parent 673e54710a
commit c415c456ea

View file

@ -1,3 +1,9 @@
#!/bin/sh
#!/bin/bash
image="$1"
exec imv "$(dirname "$image")"/* -n "$image"
declare -a ARGS
for a in "$(dirname "$image")"/*; do
if [ -f "$a" ]; then
ARGS+=("$a")
fi
done
exec imv "${ARGS[@]}" -n "$image"