#!/bin/sh

test -d tmp && exit 1
mkdir tmp

cd tmp
cvs -d cvs.sourceforge.jp:/cvsroot/samurai-graph co -P samurai-graph
cd samurai-graph
version=`grep "samurai-graph.version" src/resources/samurai-graph.properties | sed -e "s+^samurai-graph.version=++g" -e 's+.$++'`
rm -rf `find . -name '*.jar'`
rm -rf `find . -name '*.exe'`
rm -rf `find . -name '*.dll'`
rm -rf `find . -name 'CVS' -type d`
cd ..
mv samurai-graph samurai-graph-src-$version
zip -9 -r samurai-graph-src-$version.zip samurai-graph-src-$version
