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