Created
July 8, 2024 22:38
-
-
Save stvoidit/ecf66a67984edcb51b58ab56852effe6 to your computer and use it in GitHub Desktop.
imv-folder with sorting by mtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
image="$1" | |
declare -a ARGS order | |
readarray -t order < <(find "$(dirname "$image")"/* -maxdepth 2 -printf "%T+\t%p\n" | sort -r | sed 's/^.*\t//') | |
for a in "${order[@]}"; do | |
if [ -f "$a" ]; then | |
# echo $a | |
ARGS+=("$a") | |
fi | |
done | |
exec /usr/libexec/imv/imv "${ARGS[@]}" -n "$image" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment