summaryrefslogtreecommitdiff
path: root/bz
blob: 13fc530018e53abdd9769cb21ab9a24b15032939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash -ex
#
# helper script to put things into place
#

DATA="pix/$1.pix stl/$1.stl"

[ -r data/pix/$1.pix.bz2 ] || cp $1.pix data/pix/
[ -r data/stl/$1.stl.bz2 ] || 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 && for n in $DATA; do [ -r $n.bz2 ] || bzip2 -v -9 $n; done; )

git add data/png/$1.png
git add data/jpg/$1.jpg
( cd data && for n in $DATA; do git add $n.bz2; done; )