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.
This commit is contained in:
parent
ac30f34bd3
commit
daea88c572
|
@ -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")"
|
||||
|
|
Loading…
Reference in a new issue