#!/bin/bash -e

#©keithhedger Wed 22 May 19:55:26 BST 2013 kdhedger68713@gmail.com

#aclocal.m4
#autogen.sh
#compile
#configure
#COPYING
#INSTALL
#Makefile.am
#makepkg
#NEWS
#remakesourcelist
#Xfwm4CompositeEditor/
#AUTHORS
#ChangeLog
#config.h.in
#configure.ac
#depcomp*
#.gitignore
#install-sh
#Makefile.in
#missing
#README

VERSION=$(head ./configure.ac|grep AC_INIT|awk -F [ '{print $3}'|awk -F ] '{print $1}')

svn commit -m ""
cd /tmp
svn co file:///media/LinuxData/Development/SVN/Xfwm4CompositeEditor
find Xfwm4CompositeEditor -name ".svn" -exec rm -rf '{}' \; || true
rm /tmp/Xfwm4CompositeEditor/makepkg
mv /tmp/Xfwm4CompositeEditor /tmp/Xfwm4CompositeEditor-${VERSION}
cd /tmp/Xfwm4CompositeEditor-${VERSION}
./autogen.sh --prefix=/usr
make
make distclean
rm -rf autom4te.cache
cd ..
tar -czvf Xfwm4CompositeEditor-${VERSION}.tar.gz Xfwm4CompositeEditor-${VERSION}
rm -r /tmp/Xfwm4CompositeEditor-${VERSION}