7232695
#!/bin/bash
7232695
7232695
set -e
7232695
7232695
if [ -z "$1" ]; then
7232695
  echo "Please give your dev.java.net username on the command line."
7232695
  exit 1
7232695
fi
7232695
7232695
if [ -z "$2" ]; then
7232695
  echo "Please give the desired date on the command line."
7232695
  exit 1
7232695
fi
7232695
7232695
CVSROOT=":pserver:${1}@cvs.dev.java.net:/cvs"
7232695
MODULE=jai-imageio-core
7232695
DIR=$MODULE-cvs$2-CLEANED
7232695
7232695
if [ -e $DIR ]; then
7232695
  echo "Please remove $DIR and try again."
7232695
  exit 1
7232695
fi
7232695
7232695
cvs -d $CVSROOT -f login
7232695
7232695
echo "Checking out"
7232695
cvs -z 3 -d $CVSROOT -f export -D $2 -d $DIR $MODULE
7232695
7232695
echo "Cleaning"
7232695
cd $DIR
7232695
rm -rf LICENSE-codecLibJIIO.txt src/share/classes/jj2000 src/share/jclib4jai www
7232695
cd ..
7232695
7232695
echo "Making tarball"
7232695
find $DIR -type d -print0 | xargs -0 touch -d $2 -c
7232695
tar cJf $DIR.tar.xz $DIR --owner 0 --group 0
7232695
tar czf $DIR.tar.gz $DIR --owner 0 --group 0
7232695
7232695
echo "Cleaning up"
7232695
rm -rf $DIR
7232695
7232695
echo "Results in $DIR.tar.xz and $DIR.tar.gz"