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