diff options
author | Maxim Karasev <begs@disroot.org> | 2021-09-08 20:56:41 +0300 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2021-09-29 21:17:05 +0000 |
commit | daea88c572d8ef1d92b29ecf622eb11c138ab550 (patch) | |
tree | 4bf0408d0b52b9104ed402122161bf1bad06ac6f | |
parent | ac30f34bd32ec468312472b207878db842426aef (diff) | |
download | imv-daea88c572d8ef1d92b29ecf622eb11c138ab550.tar.gz |
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.
-rwxr-xr-x | contrib/imv-folder | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/contrib/imv-folder b/contrib/imv-folder index 33ea051..d9fb46f 100755 --- a/contrib/imv-folder +++ b/contrib/imv-folder @@ -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")" |