#!/bin/bash

rm -rf icemon-*

git clone https://github.com/icecc/icemon.git icemon

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

mv icemon icemon-$VERSION

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

rm -rf icemon-$VERSION
