#!/bin/sh
# simple script for updating version info
set -e

GIT_ROOT=`git rev-parse --show-toplevel`

sed 's/\s*=\s*/=/g' < "${GIT_ROOT}/version.wx" > "${GIT_ROOT}/version.wx.tmp"
. "${GIT_ROOT}/version.wx.tmp"
rm "${GIT_ROOT}/version.wx.tmp"
rm  ${GIT_ROOT}/src/ui/wxWidgets/version.h
${GIT_ROOT}/Misc/mkversion.pl MAJOR=${VER_MAJOR} MINOR=${VER_MINOR} REV=${VER_REV} SPECIAL=${VER_SPECIAL} "${GIT_ROOT}/src/ui/wxWidgets/version.in" "${GIT_ROOT}/src/ui/wxWidgets/version.h"
