aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorsomini <dev@somini.xyz>2020-09-24 22:56:24 +0100
committerHarry Jeffery <harry@exec64.co.uk>2021-07-08 23:30:24 +0100
commitc415c456eac994ee89605e9a8098a163e452e70f (patch)
tree627e5c86022a5c00908ba0066211e26b8f9f7172 /files
parent673e54710af0e9d428df498ecadb3735a689bb17 (diff)
downloadimv-c415c456eac994ee89605e9a8098a163e452e70f.tar.gz
Fix imv-folder usage with sub-folders with images
See https://github.com/eXeC64/imv/pull/225#discussion_r494270357
Diffstat (limited to 'files')
-rwxr-xr-xfiles/imv-folder10
1 files changed, 8 insertions, 2 deletions
diff --git a/files/imv-folder b/files/imv-folder
index 8f90fc2..151fc51 100755
--- a/files/imv-folder
+++ b/files/imv-folder
@@ -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"