From 084f834080a33a1d5817971c0dbe2b3413ec95d4 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sun, 14 Mar 2010 15:29:10 +0000 Subject: [PATCH] Added a script to automate creation of data archive for releases --- mk/linux/makedata.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 mk/linux/makedata.sh diff --git a/mk/linux/makedata.sh b/mk/linux/makedata.sh new file mode 100755 index 000000000..52bffb042 --- /dev/null +++ b/mk/linux/makedata.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +VERSION=`autoconf -t AC_INIT | sed -e 's/[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/g'` +RELEASENAME=megaglest-data +RELEASEDIR="`pwd`/release/$RELEASENAME-$VERSION" + +echo "Creating data package in $RELEASEDIR" + +rm -rf $RELEASEDIR +mkdir -p $RELEASEDIR +# copy sources +pushd "`pwd`/../../data/glest_game" +find data/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +find docs/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +find maps/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +find scenarios/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +find screenshots/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +find techs/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +find tilesets/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +find tutorials/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';' +popd + +pushd $RELEASEDIR +find -name "\.svn" -exec rm -rf {} \; +popd + +pushd release +PACKAGE="$RELEASENAME-$VERSION.tar.bz2" +echo "creating $PACKAGE" + +pushd $RELEASEDIR +tar -c --bzip2 -f "../$PACKAGE" * +popd