1
0
Fork 0
fgmeta/build_release_linux.sh

65 lines
1.5 KiB
Bash
Raw Normal View History

2011-01-07 22:38:39 +00:00
#!/bin/sh
2011-01-09 22:49:52 +00:00
if [ "$WORKSPACE" == "" ]; then
echo "ERROR: Missing WORKSPACE environment variable."
exit 1
fi
VERSION=`cat flightgear/version`
#####################################################################################
# remove old and create fresh build directories
rm -rf sgBuild
rm -rf fgBuild
mkdir -p sgBuild
mkdir -p fgBuild
mkdir -p output
rm -rf output/*
2012-01-18 21:40:04 +00:00
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
#####################################################################################
echo "Starting on SimGear"
cd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../simgear
# compile
2011-01-09 22:49:52 +00:00
make
if [ $? -ne '0' ]; then
echo "make simgear failed"
exit 1
fi
make install
# build source package and copy to output
make package_source
cp simgear-*.tar.bz2 ../output/.
#####################################################################################
2011-01-09 22:49:52 +00:00
echo "Starting on FlightGear"
cd ../fgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../flightgear
# compile
2011-01-09 22:49:52 +00:00
make
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
make install
# build source package and copy to output
make package_source
cp flightgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Assembling base package"
cd $WORKSPACE
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/