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