~exec64/imv

daea88c572d8ef1d92b29ecf622eb11c138ab550 — Maxim Karasev 10 months ago ac30f34
Simplify imv-folder script

This changes make it more portable by removing bash dependency and not
using GNU-specific 'sort' syntax. Also this fixes issue with selected
image not being displayed first.
1 files changed, 2 insertions(+), 10 deletions(-)

M contrib/imv-folder
M contrib/imv-folder => contrib/imv-folder +2 -10
@@ 1,10 1,2 @@
#!/bin/bash
image="$1"
declare -a ARGS order
readarray -t -d '' order < <(printf '%s\0' "$(dirname "$image")"/* | sort -z --sort=version)
for a in "${order[@]}"; do
	if [ -f "$a" ]; then
		ARGS+=("$a")
	fi
done
exec imv "${ARGS[@]}" -n "$image"
#!/bin/sh
exec imv -n "$1" "$(dirname "$1")"