#!/bin/bash

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

git clone https://github.com/KDAB/hotspot.git hotspot

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

mv hotspot hotspot-$VERSION

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

rm -rf hotspot-$VERSION
