Update download_and_compile script for FG2.4.0
More GIT magic: cleanly switch between stable and unstable branches.
This commit is contained in:
parent
379aa18877
commit
bf9d84fb3a
@ -18,7 +18,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
VERSION="1.4.2"
|
VERSION="1.4.3"
|
||||||
|
|
||||||
#COMPILE GIT FGFS
|
#COMPILE GIT FGFS
|
||||||
|
|
||||||
@ -122,9 +122,19 @@ fi
|
|||||||
# Last stable revision: currently FlightGear 2.4.0 with 3.0.1
|
# Last stable revision: currently FlightGear 2.4.0 with 3.0.1
|
||||||
PLIB_STABLE_REVISION="2163"
|
PLIB_STABLE_REVISION="2163"
|
||||||
OSG_STABLE_REVISION="http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.1"
|
OSG_STABLE_REVISION="http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.1"
|
||||||
|
|
||||||
|
# common stable branch for flightgear, simgear and fgdata
|
||||||
|
FGSG_STABLE_GIT_BRANCH="release/2.4.0"
|
||||||
|
|
||||||
|
# unstable branch: next for sg/fg, master for fgdata
|
||||||
|
FGSG_UNSTABLE_GIT_BRANCH="next"
|
||||||
|
FGDATA_UNSTABLE_GIT_BRANCH="master"
|
||||||
|
|
||||||
|
# stable GIT revision: release tag
|
||||||
SIMGEAR_STABLE_REVISION="version/2.4.0-final"
|
SIMGEAR_STABLE_REVISION="version/2.4.0-final"
|
||||||
FGFS_STABLE_REVISION="version/2.4.0-final"
|
FGFS_STABLE_REVISION="version/2.4.0-final"
|
||||||
FGFS_DATA_STABLE_REVISION="version/2.4.0-final"
|
FGFS_DATA_STABLE_REVISION="version/2.4.0-final"
|
||||||
|
|
||||||
FGRUN_STABLE_REVISION="625"
|
FGRUN_STABLE_REVISION="625"
|
||||||
FGCOM_STABLE_REVISION="234"
|
FGCOM_STABLE_REVISION="234"
|
||||||
FGCOMGUI_STABLE_REVISION="46"
|
FGCOMGUI_STABLE_REVISION="46"
|
||||||
@ -538,17 +548,28 @@ then
|
|||||||
|
|
||||||
cd simgear
|
cd simgear
|
||||||
|
|
||||||
|
git fetch origin
|
||||||
if [ "$STABLE" = "STABLE" ]
|
if [ "$STABLE" = "STABLE" ]
|
||||||
then
|
then
|
||||||
git pull origin
|
# switch to stable branch
|
||||||
|
# create local stable branch, ignore errors if it exists
|
||||||
|
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null
|
||||||
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
|
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
||||||
|
# get indicated stable version
|
||||||
git reset --hard $SIMGEAR_STABLE_REVISION
|
git reset --hard $SIMGEAR_STABLE_REVISION
|
||||||
|
else
|
||||||
|
# switch to unstable branch
|
||||||
|
# create local unstable branch, ignore errors if it exists
|
||||||
|
git branch -f $FGSG_UNSTABLE_GIT_BRANCH origin/$FGSG_UNSTABLE_GIT_BRANCH 2> /dev/null
|
||||||
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
|
git checkout -f $FGSG_UNSTABLE_GIT_BRANCH
|
||||||
|
# pull latest version from the unstable branch
|
||||||
|
git pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git pull
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo " OK" >> $LOGFILE
|
echo " OK" >> $LOGFILE
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
@ -623,14 +644,26 @@ then
|
|||||||
|
|
||||||
cd flightgear
|
cd flightgear
|
||||||
|
|
||||||
|
git fetch origin
|
||||||
if [ "$STABLE" = "STABLE" ]
|
if [ "$STABLE" = "STABLE" ]
|
||||||
then
|
then
|
||||||
git pull origin
|
# switch to stable branch
|
||||||
|
# create local stable branch, ignore errors if it exists
|
||||||
|
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null
|
||||||
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
|
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
||||||
|
# get indicated stable version
|
||||||
git reset --hard $FGFS_STABLE_REVISION
|
git reset --hard $FGFS_STABLE_REVISION
|
||||||
|
else
|
||||||
|
# switch to unstable branch
|
||||||
|
# create local unstable branch, ignore errors if it exists
|
||||||
|
git branch -f $FGSG_UNSTABLE_GIT_BRANCH origin/$FGSG_UNSTABLE_GIT_BRANCH 2> /dev/null
|
||||||
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
|
git checkout -f $FGSG_UNSTABLE_GIT_BRANCH
|
||||||
|
# pull latest version from the unstable branch
|
||||||
|
git pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
git pull
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo " OK" >> $LOGFILE
|
echo " OK" >> $LOGFILE
|
||||||
@ -680,20 +713,35 @@ then
|
|||||||
|
|
||||||
if [ -d "fgdata" ]
|
if [ -d "fgdata" ]
|
||||||
then
|
then
|
||||||
cd fgdata
|
echo "fgdata exists already."
|
||||||
|
|
||||||
if [ "$STABLE" = "STABLE" ]
|
|
||||||
then
|
|
||||||
git pull origin
|
|
||||||
git reset --hard $FGFS_DATA_STABLE_REVISION
|
|
||||||
fi
|
|
||||||
|
|
||||||
git pull
|
|
||||||
cd ..
|
|
||||||
else
|
else
|
||||||
|
# no repository yet - need to clone a fresh one
|
||||||
git clone git://gitorious.org/fg/fgdata.git
|
git clone git://gitorious.org/fg/fgdata.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd fgdata
|
||||||
|
|
||||||
|
git fetch origin
|
||||||
|
if [ "$STABLE" = "STABLE" ]
|
||||||
|
then
|
||||||
|
# switch to stable branch
|
||||||
|
# create local stable branch, ignore errors if it exists
|
||||||
|
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null
|
||||||
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
|
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
||||||
|
# get indicated stable version
|
||||||
|
git reset --hard $FGFS_DATA_STABLE_REVISION
|
||||||
|
else
|
||||||
|
# switch to unstable branch
|
||||||
|
# create local unstable branch, ignore errors if it exists
|
||||||
|
git branch -f $FGDATA_UNSTABLE_GIT_BRANCH origin/$FGDATA_UNSTABLE_GIT_BRANCH 2> /dev/null
|
||||||
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
|
git checkout -f $FGDATA_UNSTABLE_GIT_BRANCH
|
||||||
|
# pull latest version from the unstable branch
|
||||||
|
git pull
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
echo " OK" >> $LOGFILE
|
echo " OK" >> $LOGFILE
|
||||||
cd "$EXDIR"
|
cd "$EXDIR"
|
||||||
|
Loading…
Reference in New Issue
Block a user