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