Blame SOURCES/generate-tarball.sh

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