packages/easyscan: ignore scanimage message

This commit is contained in:
Primrose 2025-07-14 16:18:49 +02:00
parent 7f1cece74c
commit e85e956701
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -6,11 +6,15 @@ tempdir="$(mktemp -d)"
counter=1
while :; do
ok="true"
echo "Scanning page $counter"
# If no size is set, the output will be wonky-sized
# 210,297 is the size of A4
scanimage -x 210 -y 297 --resolution 300 -o "$tempdir/easyscan_$counter.pdf" ||
scanimage -x 210 -y 297 --resolution 300 -o "$tempdir/easyscan_$counter.pdf" >/dev/null 2>&1 ||
{
echo "Failed to scan page..."
ok="false"
}
IFS= read -r -p "Continue scanning? [Y/n] " cont
@ -19,9 +23,12 @@ while :; do
echo "Exiting..."
break
;;
[yY] | *) ;;
esac
[yY] | *)
if $ok; then
counter=$((counter += 1))
fi
;;
esac
done
# Multiple files are scanned, join them