summaryrefslogtreecommitdiff
path: root/bz
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-08-31 20:00:21 -0300
committerWerner Almesberger <werner@almesberger.net>2014-08-31 20:00:21 -0300
commitdb4af839535d004bf0da5e4d1b56f8477b518f76 (patch)
treed27fffe8170c6f6a9f611f0f54842ae5c68039bf /bz
parent10bb0b441d68c3fa58cca66667e948e9ffced74d (diff)
downloadscans-db4af839535d004bf0da5e4d1b56f8477b518f76.tar.gz
scans-db4af839535d004bf0da5e4d1b56f8477b518f76.tar.bz2
scans-db4af839535d004bf0da5e4d1b56f8477b518f76.zip
bz: script to move new scans to the right places and to add them to the repo
Diffstat (limited to 'bz')
-rwxr-xr-xbz21
1 files changed, 21 insertions, 0 deletions
diff --git a/bz b/bz
new file mode 100755
index 0000000..8c99442
--- /dev/null
+++ b/bz
@@ -0,0 +1,21 @@
+#!/bin/bash -ex
+#
+# helper script to put things into place
+#
+
+DATA="pix/$1.pix stl/$1.stl"
+
+[ -r data/pix/$1.pix ] || cp $1.pix data/pix/
+[ -r data/stl/$1.stl ] || cp $1.stl data/stl/
+[ -r data/png/$1.png ] || cp $1.png data/png/
+
+[ -r stl/$1.stl ] || mv $1.stl stl/
+
+[ -r data/jpg/$1.jpg] ||
+ convert -resize 280x200 data/png/$1.png data/jpg/$1.jpg
+
+( cd data && bzip2 -v -9 $DATA; )
+
+git add data/png/$1.png
+git add data/jpg/$1.jpg
+( cd data && for n in $DATA; do git add $n.bz2; done; )