mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
packages/easyscan: ignore scanimage message
This commit is contained in:
parent
7f1cece74c
commit
e85e956701
1 changed files with 10 additions and 3 deletions
|
|
@ -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] | *) ;;
|
||||
[yY] | *)
|
||||
if $ok; then
|
||||
counter=$((counter += 1))
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
counter=$((counter += 1))
|
||||
done
|
||||
|
||||
# Multiple files are scanned, join them
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue