#!/bin/bash

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

git clone https://invent.kde.org/multimedia/amarok.git amarok

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

mv amarok amarok-$VERSION

tar --exclude-vcs -cf amarok-$VERSION.tar amarok-$VERSION
plzip -9 amarok-$VERSION.tar

rm -rf amarok-$VERSION
