Skip to content
Snippets Groups Projects
Unverified Commit cd937192 authored by guraga's avatar guraga Committed by GitHub
Browse files

Update "examples/find-lowres"

Convert "examples/find-lowres" from "zsh" script to "sh" script.
parent ad6b72d3
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env zsh
#!/bin/sh
# Recursively find images below a certain resolution
#
# Usage: find-lowres [-r] [directory [dimension]]
......@@ -10,20 +10,23 @@
remove=0
while [[ $1 == -* ]]; do
while true
do
case $1 in
-r) remove=1 ;;
-*) echo "option \"$1\" ignored" ;;
-|--) shift; break ;;
*) break ;;
esac
shift
done
base=${1-.}
dimension=${2-1000x800}
dir=${1:-.}
dimension=${2:-1000x800}
if (( remove ))
if [ "$remove" = "1" ]
then
feh --action 'rm %F' -rlV --max-dim ${dimension} ${base}
feh --action 'rm %F' -rlV --max-dim "${dimension}" "${dir}"
else
feh -rlV --max-dim ${dimension} ${base}
feh -rlV --max-dim "${dimension}" "${dir}"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment