mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49: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
|
counter=1
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
|
ok="true"
|
||||||
|
echo "Scanning page $counter"
|
||||||
|
|
||||||
# If no size is set, the output will be wonky-sized
|
# If no size is set, the output will be wonky-sized
|
||||||
# 210,297 is the size of A4
|
# 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..."
|
echo "Failed to scan page..."
|
||||||
|
ok="false"
|
||||||
}
|
}
|
||||||
|
|
||||||
IFS= read -r -p "Continue scanning? [Y/n] " cont
|
IFS= read -r -p "Continue scanning? [Y/n] " cont
|
||||||
|
|
@ -19,9 +23,12 @@ while :; do
|
||||||
echo "Exiting..."
|
echo "Exiting..."
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
[yY] | *) ;;
|
[yY] | *)
|
||||||
esac
|
if $ok; then
|
||||||
counter=$((counter += 1))
|
counter=$((counter += 1))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# Multiple files are scanned, join them
|
# Multiple files are scanned, join them
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue