Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

Commit d5cc638

Browse files
committed
tmpdir variable renamed to download_dir
1 parent 876b03b commit d5cc638

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

flightgear_compiler

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export PATH="/usr/lib/ccache:${PATH}"
5151
# Directory where everything will be installed at.
5252
installdir="$HOME/FlightGear"
5353
# Directory where the source codes will be downloaded to.
54-
tempdir="/tmp/FlightGear_Sources"
54+
download_dir="/tmp/FlightGear_Sources"
5555
# Temporary directory where cmake will run from.
5656
buildir="/dev/shm/FlightGear_Compiler_Output"
5757
version="$(cat VERSION)"
@@ -87,7 +87,7 @@ clear
8787
# Now the script will run cmake and make and make install for each component.
8888
echo ""
8989
echo "#====== Compiling OpenSceneGraph."
90-
cd $buildir/OSG && cmake $tempdir/OSG -DCMAKE_BUILD_TYPE="$buildtype" -DOpenGL_GL_PREFERENCE=LEGACY -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
90+
cd $buildir/OSG && cmake $download_dir/OSG -DCMAKE_BUILD_TYPE="$buildtype" -DOpenGL_GL_PREFERENCE=LEGACY -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
9191
make -j $ncores && echo "#====== Installing OpenSceneGraph." && make install && rm -rf $buildir/OSG
9292

9393
echo ""
@@ -96,7 +96,7 @@ echo "#====== you have all dependencies required."
9696

9797
echo ""
9898
echo "#====== Compiling PLIB."
99-
cd $buildir/PLIB && cmake $tempdir/PLIB -DCMAKE_BUILD_TYPE="$buildtype" -DOpenGL_GL_PREFERENCE=LEGACY -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
99+
cd $buildir/PLIB && cmake $download_dir/PLIB -DCMAKE_BUILD_TYPE="$buildtype" -DOpenGL_GL_PREFERENCE=LEGACY -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
100100
make -j $ncores && echo "#====== Installing PLIB." && make install&& rm -rf $buildir/PLIB
101101

102102
echo ""
@@ -105,14 +105,14 @@ echo "#====== you have all dependencies required."
105105

106106
echo ""
107107
echo "#====== Compiling SimGear."
108-
cd $buildir/SimGear && cmake $tempdir/SimGear -DCMAKE_BUILD_TYPE="$buildtype" -DBUILD_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_SIMD_CODE=ON -DENABLE_SIMD=ON -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
108+
cd $buildir/SimGear && cmake $download_dir/SimGear -DCMAKE_BUILD_TYPE="$buildtype" -DBUILD_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_SIMD_CODE=ON -DENABLE_SIMD=ON -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
109109
make -j $ncores && echo "#====== Installing SimGear." && make install&& rm -rf $buildir/SimGear
110110
echo "#====== If something went wrong when compiling SimGear then make sure"
111111
echo "#====== you have all dependencies required."
112112

113113
echo ""
114114
echo "#====== Compiling FlightGear."
115-
cd $buildir/FlightGear && cmake $tempdir/FlightGear -DCMAKE_BUILD_TYPE="$buildtype" -DSYSTEM_FLITE=OFF -DENABLE_AUTOTESTING=OFF -DENABLE_SIMD=ON -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
115+
cd $buildir/FlightGear && cmake $download_dir/FlightGear -DCMAKE_BUILD_TYPE="$buildtype" -DSYSTEM_FLITE=OFF -DENABLE_AUTOTESTING=OFF -DENABLE_SIMD=ON -DCMAKE_CXX_FLAGS_RELEASE="$cflags" -DCMAKE_C_FLAGS_RELEASE="$cflags" -DCMAKE_INSTALL_PREFIX=$installdir
116116
make -j $ncores && echo "#====== Installing FlightGear." && make install && rm -rf $buildir/FlightGear
117117

118118
echo ""

flightgear_downloader

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# the OpenSceneGraph, PLIB, SimGear libraries and
4747
# FlightGear Flight Simulator.
4848

49-
tempdir="/tmp/FlightGear_Sources" # Directory where the source codes will be downloaded to.
49+
download_dir="/tmp/FlightGear_Sources" # Directory where the source codes will be downloaded to.
5050
fgbranch="release/2020.3" # Branch for FlightHear
5151
sgbranch="release/2020.3" # Branch for SimGear
5252
osgbranch="OpenSceneGraph-3.6" # Branch for OpenSceneGraph
@@ -91,45 +91,45 @@ echo "#====== Downloading Source Codes Started."
9191
# Checking OpenSceneGraph
9292
echo ""
9393
echo "#====== Checking if OpenSceneGraph was already downloaded."
94-
if [ -d "$tempdir/OSG" ]; then
94+
if [ -d "$download_dir/OSG" ]; then
9595
echo "#====== OpenSceneGraph found, updating the repo if neded."
96-
cd $tempdir/OSG && git pull # Try to update existing previously cloned repo.
96+
cd $download_dir/OSG && git pull # Try to update existing previously cloned repo.
9797
else
9898
echo "#====== OpenSceneGraph not found, downloading now."
99-
git clone --depth=1 -b $osgbranch $osgurl $tempdir/OSG # Clone repo from Git
99+
git clone --depth=1 -b $osgbranch $osgurl $download_dir/OSG # Clone repo from Git
100100
fi
101101

102102
# Checking PLIB
103103
echo ""
104104
echo "#====== Checking if PLIB was already downloaded."
105-
if [ -d "$tempdir/PLIB" ]; then
105+
if [ -d "$download_dir/PLIB" ]; then
106106
echo "#====== PLIB found, updating the repo if neded."
107-
cd $tempdir/PLIB && git pull # Try to update existing previously cloned repo.
107+
cd $download_dir/PLIB && git pull # Try to update existing previously cloned repo.
108108
else
109109
echo "#====== PLIB not found, downloading now."
110-
git clone --depth=1 https://git.code.sf.net/p/libplib/code $tempdir/PLIB # Clone repo from Git
110+
git clone --depth=1 https://git.code.sf.net/p/libplib/code $download_dir/PLIB # Clone repo from Git
111111
fi
112112

113113
# Checking SimGear
114114
echo ""
115115
echo "#====== Checking if SimGear was already downloaded."
116-
if [ -d "$tempdir/SimGear" ]; then
116+
if [ -d "$download_dir/SimGear" ]; then
117117
echo "#====== SimGear found, updating the repo if neded."
118-
cd $tempdir/SimGear && git pull # Try to update existing previously cloned repo.
118+
cd $download_dir/SimGear && git pull # Try to update existing previously cloned repo.
119119
else
120120
echo "#====== SimGear not found, downloading now."
121-
git clone --depth=1 -b $fgbranch git://git.code.sf.net/p/flightgear/simgear $tempdir/SimGear # Clone repo from Git
121+
git clone --depth=1 -b $fgbranch git://git.code.sf.net/p/flightgear/simgear $download_dir/SimGear # Clone repo from Git
122122
fi
123123

124124
# Checking FlightGear
125125
echo ""
126126
echo "#====== Checking if FlightGear was already downloaded."
127-
if [ -d "$tempdir/FlightGear" ]; then
127+
if [ -d "$download_dir/FlightGear" ]; then
128128
echo "#====== FlightGear found, updating the repo if neded."
129-
cd $tempdir/FlightGear && git pull # Try to update existing previously cloned repo.
129+
cd $download_dir/FlightGear && git pull # Try to update existing previously cloned repo.
130130
else
131131
echo "#====== FlightGear not found, downloading now."
132-
git clone --depth=1 -b $fgbranch git://git.code.sf.net/p/flightgear/flightgear $tempdir/FlightGear # Clone repo from Git
132+
git clone --depth=1 -b $fgbranch git://git.code.sf.net/p/flightgear/flightgear $download_dir/FlightGear # Clone repo from Git
133133
fi
134134

135135
echo ""

0 commit comments

Comments
 (0)