2006-03-21 21:18:26 +00:00
|
|
|
#!/bin/sh
|
2010-04-28 09:37:38 +00:00
|
|
|
VERSION=`grep SoftwareVersion installers/autopackage/default.x86.apspec|cut -d ' ' -f 2`
|
2006-03-21 21:18:26 +00:00
|
|
|
DESTINATION=`pwd`/TarballPackages
|
|
|
|
TREEROOT=`pwd`
|
|
|
|
|
|
|
|
if [ "$VERSION" == "" ]
|
|
|
|
then
|
|
|
|
echo "I can't find the apspec file. This script needs to be run from"
|
|
|
|
echo "the repository top level directory to find all it needs."
|
|
|
|
exit 255
|
|
|
|
fi
|
|
|
|
|
2011-02-16 13:24:56 +00:00
|
|
|
if [ -e $DESTINATION/oolite-$VERSION-src.tar.gz ]; then
|
|
|
|
echo "Source Tarball for Version $VERSION already exists"
|
|
|
|
# TODO - query / param to continue anyway
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2006-03-21 21:18:26 +00:00
|
|
|
# clear out the cruft
|
|
|
|
rm -rf $DESTINATION/oolite-$VERSION-src
|
|
|
|
rm -f $DESTINATION/oolite-$VERSION-src.tar.gz
|
|
|
|
rm -rf $DESTINATION/oolite-$VERSION-data
|
|
|
|
rm -f $DESTINATION/oolite-$VERSION-data.tar.gz
|
|
|
|
|
|
|
|
if ! mkdir -p $DESTINATION/oolite-$VERSION-src;
|
|
|
|
then
|
|
|
|
echo "Couldn't create directory for the source files"
|
|
|
|
exit 255
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! mkdir -p $DESTINATION/oolite-$VERSION-data;
|
|
|
|
then
|
|
|
|
echo "Couldn't create directory for the data files"
|
|
|
|
exit 255
|
|
|
|
fi
|
|
|
|
|
2011-02-16 13:24:56 +00:00
|
|
|
for i in autopackage debian deps Doc FreeDesktop installers Schemata Oolite-importer Oolite.xcodeproj src tools GNUmakefile GNUmakefile.postamble Makefile README.txt contributors.txt
|
2006-03-21 21:18:26 +00:00
|
|
|
do
|
|
|
|
if ! cp -r $i $DESTINATION/oolite-$VERSION-src;
|
|
|
|
then
|
|
|
|
echo "Failed to copy $i to $DESTINATION/oolite-$VERSION-src"
|
|
|
|
exit 255
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if ! cp -r Resources $DESTINATION/oolite-$VERSION-data;
|
|
|
|
then
|
|
|
|
echo "Failed to copy Resources to $DESTINATION/oolite-$VERSION-data"
|
|
|
|
exit 255
|
|
|
|
fi
|
|
|
|
|
2011-02-16 13:24:56 +00:00
|
|
|
# Save the SVN Revision number in the source tarball for the tools/mkversion script
|
|
|
|
echo `tools/mkversion --subversion` > $DESTINATION/oolite-$VERSION-src/svnrevision
|
|
|
|
|
|
|
|
#echo "Press a key to continue"
|
|
|
|
#read -s -n 1
|
|
|
|
|
2006-03-21 21:18:26 +00:00
|
|
|
cd $DESTINATION
|
2011-02-16 13:24:56 +00:00
|
|
|
mv oolite-$VERSION-src oolite-$VERSION
|
|
|
|
if ! tar zcf oolite-$VERSION-src.tar.gz oolite-$VERSION --exclude .svn
|
2006-03-21 21:18:26 +00:00
|
|
|
then
|
|
|
|
echo "Failed to create src tarball"
|
|
|
|
exit 255
|
|
|
|
fi
|
|
|
|
|
|
|
|
# so the data tarball has the same path as src
|
2011-02-16 13:24:56 +00:00
|
|
|
rm -rf oolite-$VERSION
|
|
|
|
mv oolite-$VERSION-data oolite-$VERSION
|
|
|
|
if ! tar zcf oolite-$VERSION-data.tar.gz oolite-$VERSION --exclude .svn
|
2006-03-21 21:18:26 +00:00
|
|
|
then
|
|
|
|
echo "Failed to create data tarball"
|
|
|
|
exit 255
|
|
|
|
fi
|
|
|
|
|
2011-02-16 13:24:56 +00:00
|
|
|
rm -rf oolite-$VERSION
|
2006-03-21 21:18:26 +00:00
|
|
|
echo "Tarballs placed in $DESTINATION."
|
|
|
|
|