#!/bin/bash

rm -rf bdsup2sub++-*

git clone https://github.com/amichaeltm/BDSup2SubPlusPlus.git bdsup2sub++

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

mv bdsup2sub++ bdsup2sub++-$VERSION

tar --exclude-vcs -cf bdsup2sub++-$VERSION.tar bdsup2sub++-$VERSION
plzip -9 bdsup2sub++-$VERSION.tar

rm -rf bdsup2sub++-$VERSION
