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