#!/bin/bash

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

git clone https://invent.kde.org/graphics/kgraphviewer.git kgraphviewer

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

mv kgraphviewer kgraphviewer-$VERSION

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

rm -rf kgraphviewer-$VERSION
