8bd1330fa2
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@310 127b21dd-08f5-0310-b4b7-95ae10353056
56 lines
1.3 KiB
Bash
Executable File
56 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
OS=`uname`
|
|
CPU=`uname -m`
|
|
VERSION=`grep SoftwareVersion autopackage/default.apspec|cut -d ' ' -f 2`
|
|
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
|
|
|
|
if [ $CPU == 'i686' ]
|
|
then
|
|
CPU="x86"
|
|
fi
|
|
|
|
DEPSDIR="$TREEROOT/deps/$OS-$CPU-deps"
|
|
if [ -d $DEPSDIR ]
|
|
then
|
|
echo "Creating tarball binary package Oolite-$OS-$VERSION-$CPU.tar.gz"
|
|
else
|
|
echo "No dependencies package exists for platform $OS-$CPU"
|
|
exit 255
|
|
fi
|
|
|
|
if make; then
|
|
echo "Build completed OK"
|
|
else
|
|
echo "Build failed, exiting."
|
|
exit 255
|
|
fi
|
|
|
|
echo "Bundling oolite.app"
|
|
PKGDIR=$DESTINATION/oolite-installer
|
|
rm -rf $PKGDIR
|
|
mkdir -p $PKGDIR
|
|
tar cf $PKGDIR/oolite-app.tar oolite.app --exclude .svn
|
|
|
|
echo "Bundling dependency package"
|
|
cp Doc/FAQ.TXT Doc/LICENSE.TXT $PKGDIR
|
|
cd $DEPSDIR
|
|
cp install oolite-update.src oolite.src PLAYING.TXT README.TXT $PKGDIR
|
|
tar cf $PKGDIR/oolite-deps.tar oolite-deps --exclude .svn
|
|
echo $VERSION >$PKGDIR/release.txt
|
|
cd $DESTINATION
|
|
tar zcf Oolite-$OS-$VERSION-$CPU.tar.gz oolite-installer
|
|
|
|
echo "Removing temporary files"
|
|
rm -rf $PKGDIR
|
|
|
|
echo "Created $DESTINATION/Oolite-$OS-$VERSION-$CPU.tar.gz"
|
|
|