d0f821
#!/bin/sh
d0f821
set -e -x
d0f821
test $# -eq 1
d0f821
test ! -d guice
d0f821
git clone git://github.com/google/guice.git
d0f821
cd ./guice
d0f821
git checkout ${1}
d0f821
git branch unbundled-${1}
d0f821
git checkout unbundled-${1}
d0f821
rm -rf $(ls . | grep -E -v 'core|extensions|pom|bom|jdk8-tests|COPYING|common.xml')
d0f821
find . -name "*.jar" -delete
d0f821
find . -name "*.class" -delete
d0f821
git commit -a -m "Remove unneeded stuff"
d0f821
git tag unbundled-${1}
d0f821
git archive --format=tar --prefix=google-guice-${1}/ unbundled-${1} \
d0f821
    | xz >../google-guice-${1}.tar.xz