#!/bin/bash

rm -rf uopz-*.tar.?z*

git clone https://github.com/krakjoe/uopz.git uopz

cd uopz
  VERSION=$(git log --pretty=format:"git_%cd_%h" --date=format:"%Y%m%d" | head -n 1)
  mv package.xml ..
cd ..

mv uopz uopz-$VERSION

tar --exclude-vcs -cf uopz-$VERSION.tar uopz-$VERSION package.xml
plzip -9 uopz-$VERSION.tar

rm -rf uopz-$VERSION package.xml
