download_and_compile.sh: cleaner log output, code simplification
The "DIRECTORY=..." was printed too late in the log file (after the apt stuff). Fix that and make some code a bit easier to follow (e.g., LOGFILE is assigned only once now).
This commit is contained in:
parent
d424cdaad3
commit
a20342ed48
1 changed files with 8 additions and 8 deletions
|
@ -321,7 +321,8 @@ function _usage() {
|
|||
# set script to stop if an error occours
|
||||
set -e
|
||||
|
||||
LOGFILE=compilation_log.txt
|
||||
CBD="$PWD"
|
||||
LOGFILE="$CBD/compilation_log.txt"
|
||||
|
||||
# Available values for WHATTOBUILD and WHATTOBUILDALL:
|
||||
declare -a WHATTOBUILD_AVAIL=(
|
||||
|
@ -550,6 +551,7 @@ _log "DOWNLOAD=$DOWNLOAD"
|
|||
_log "JOPTION=$JOPTION"
|
||||
_log "OOPTION=$OOPTION"
|
||||
_log "BUILD_TYPE=$BUILD_TYPE"
|
||||
_log "DIRECTORY=$CBD"
|
||||
_logSep
|
||||
|
||||
#######################################################
|
||||
|
@ -618,22 +620,18 @@ fi
|
|||
#######################################################
|
||||
#######################################################
|
||||
|
||||
CBD=$(pwd)
|
||||
LOGFILE="$CBD/$LOGFILE"
|
||||
_log "DIRECTORY=$CBD"
|
||||
_logSep
|
||||
mkdir -p install
|
||||
SUB_INSTALL_DIR=install
|
||||
INSTALL_DIR="$CBD/$SUB_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
mkdir -p build
|
||||
mkdir -p build install
|
||||
|
||||
#######################################################
|
||||
# BACKWARD COMPATIBILITY WITH 1.9.14a
|
||||
#######################################################
|
||||
|
||||
if [ -d "$CBD"/fgfs/flightgear ]; then
|
||||
echo "Move to the new folder structure"
|
||||
_logSep
|
||||
_printLog "Move to the new folder structure"
|
||||
rm -rf OpenSceneGraph
|
||||
rm -rf plib
|
||||
rm -rf build
|
||||
|
@ -651,6 +649,8 @@ if [ -d "$CBD"/fgfs/flightgear ]; then
|
|||
echo "Done"
|
||||
fi
|
||||
|
||||
_printLog
|
||||
|
||||
#######################################################
|
||||
# cmake
|
||||
#######################################################
|
||||
|
|
Loading…
Add table
Reference in a new issue