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