STYLE: clearly document which scripts contain user-configurable settings

- unify cd, check for the cwd and error message
This commit is contained in:
mark
2017-01-19 20:47:15 +01:00
parent 9926569ca1
commit 1622a46832
17 changed files with 221 additions and 229 deletions

18
makeQt
View File

@ -28,21 +28,21 @@
# Description
# Build script for QT (the qt-everywhere-opensource-src package)
#
#------------------------------------------------------------------------------
unset qtVERSION # No default version
qtTYPE=qt-everywhere-opensource-src
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
echo " Check the OpenFOAM entries in your dot-files and source them."
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
. etc/tools/QtFunctions
#------------------------------------------------------------------------------
qtTYPE=qt-everywhere-opensource-src
unset qtVERSION # No default version
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
@ -53,7 +53,7 @@ options:
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
* build $qtTYPE, version $qtVERSION
* build $qtTYPE, version ${qtVERSION:-undefined}
USAGE
exit 1