SVN=/opt/local/bin/svn
REPO=~/scheme/chicken-eggs4
URL=http://code.call-cc.org/svn/chicken-eggs/release/4

for egg in $*; do

echo ---------- $egg -----------
cd $REPO &&
cd $egg &&
$SVN copy -m "$egg: copy to trunk" $URL/$egg $URL/$egg/trunk &&
$SVN up &&
$SVN ls | egrep -v '^trunk/$' | tr '\012' '\000' | xargs -0 $SVN rm &&
$SVN mkdir tags &&
$SVN commit -m "$egg: remove non-trunk copy, add tags/"

done
