summaryrefslogtreecommitdiff
path: root/bz
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-09-03 20:23:30 -0300
committerWerner Almesberger <werner@almesberger.net>2014-09-03 20:23:30 -0300
commit0f9d5bda3765bc4959f34e9d8c82b6f8c9f9964d (patch)
tree82afda59fbcf0b8688aed3d58bf6dcaf886b632f /bz
parent0ad6d09253b1e928b373d5ff4d5a9cc3d2e7d6dd (diff)
downloadscans-0f9d5bda3765bc4959f34e9d8c82b6f8c9f9964d.tar.gz
scans-0f9d5bda3765bc4959f34e9d8c82b6f8c9f9964d.tar.bz2
scans-0f9d5bda3765bc4959f34e9d8c82b6f8c9f9964d.zip
bz: handle compression before commit more correctly
Diffstat (limited to 'bz')
-rwxr-xr-xbz6
1 files changed, 3 insertions, 3 deletions
diff --git a/bz b/bz
index 4ee9790..13fc530 100755
--- a/bz
+++ b/bz
@@ -5,8 +5,8 @@
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/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/
@@ -14,7 +14,7 @@ DATA="pix/$1.pix stl/$1.stl"
[ -r data/jpg/$1.jpg ] ||
convert -resize 280x200 data/png/$1.png data/jpg/$1.jpg
-( cd data && bzip2 -v -9 $DATA; )
+( 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