#!/bin/bash

rvern="$(./vcs-revno)"
mingwb="$(ls /usr/ | grep mingw32 | grep -v amd64 | head --lines 1)"
qtwind="$(pwd)/qt4-win"
qtx11d="$(pwd)/qt4-x11"

if [ ! -d release ]
then
mkdir release
fi

$qtx11d/bin/lrelease unetbootin.pro
./qmake-linux
make
$mingwb-strip --strip-all unetbootin
mv unetbootin release/unetbootin-linux-$rvern
./upx --lzma release/unetbootin-linux-$rvern

