summaryrefslogtreecommitdiff
path: root/getgmissing.sh
diff options
context:
space:
mode:
Diffstat (limited to 'getgmissing.sh')
-rw-r--r--getgmissing.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/getgmissing.sh b/getgmissing.sh
new file mode 100644
index 0000000..d936425
--- /dev/null
+++ b/getgmissing.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+# See COPYING file for copyright and license details.
+
+test $# -ne 1 && echo "usage: $0 bookid" && exit
+
+getgbook -p $1 2>/dev/null | while read i
+do
+ code=`echo $i|awk '{print $1}'`
+ num=`echo $i|awk '{print $2}'`
+ test -n "$num" && num=`printf '%05d' || num=$code
+ test -f $num.png || echo $code | getgbook $1
+done