summaryrefslogtreecommitdiff
path: root/getgmissing.sh
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-08-01 18:26:56 +0100
committerNick White <hg@njw.me.uk>2011-08-01 18:26:56 +0100
commit063a0de3c10d38741c939297bb19d8284757e00c (patch)
treeff7b00c71dfc1bdd08b4fd1c143aaef5a0e12b9f /getgmissing.sh
parentaccfeb090db432165ebc7e80ddce5ab673631af4 (diff)
Lots of tightening and cleanups
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