mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: remove tabs and trailing space from new scripts
This commit is contained in:
@ -34,10 +34,10 @@ usage() {
|
|||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/}
|
usage: ${0##*/}
|
||||||
--foamInstall dir specify installation directory (e.g. /opt)
|
--foamInstall dir specify installation directory (e.g. /opt)
|
||||||
--projectName name specify project name (e.g. openfoam170)
|
--projectName name specify project name (e.g. openfoam170)
|
||||||
--archOption arch specify architecture option (only 32 or 64 applicable)
|
--archOption arch specify architecture option (only 32 or 64 applicable)
|
||||||
--paraviewInstall dir specify ParaView_DIR (e.g. /opt/paraviewopenfoam380)
|
--paraviewInstall dir specify ParaView_DIR (e.g. /opt/paraviewopenfoam380)
|
||||||
|
|
||||||
* hardcode paths to installation
|
* hardcode paths to installation
|
||||||
|
|
||||||
@ -59,30 +59,30 @@ do
|
|||||||
;;
|
;;
|
||||||
--foamInstall)
|
--foamInstall)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
foamInstall="$2"
|
foamInstall="$2"
|
||||||
echo "Replacing foamInstall setting by $foamInstall"
|
echo "Replacing foamInstall setting by $foamInstall"
|
||||||
sed -i -e '/^[^#]/s@foamInstall=.*@foamInstall='"$foamInstall@" etc/bashrc
|
sed -i -e '/^[^#]/s@foamInstall=.*@foamInstall='"$foamInstall@" etc/bashrc
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--projectName)
|
--projectName)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
projectName="$2"
|
projectName="$2"
|
||||||
echo "Replacing WM_PROJECT_DIR setting by $projectName"
|
echo "Replacing WM_PROJECT_DIR setting by $projectName"
|
||||||
sed -i -e '/^[^#]/s@WM_PROJECT_DIR=.*@WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/'"$projectName@" etc/bashrc
|
sed -i -e '/^[^#]/s@WM_PROJECT_DIR=.*@WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/'"$projectName@" etc/bashrc
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--archOption)
|
--archOption)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
archOption="$2"
|
archOption="$2"
|
||||||
echo "Replacing WM_ARCH_OPTION setting by $archOption"
|
echo "Replacing WM_ARCH_OPTION setting by $archOption"
|
||||||
sed -i -e '/^[^#]/s@: ${WM_ARCH_OPTION:=64}@WM_ARCH_OPTION='"$archOption@" etc/bashrc
|
sed -i -e '/^[^#]/s@: ${WM_ARCH_OPTION:=64}@WM_ARCH_OPTION='"$archOption@" etc/bashrc
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--paraviewInstall)
|
--paraviewInstall)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
paraviewInstall="$2"
|
paraviewInstall="$2"
|
||||||
echo "Replacing ParaView_DIR setting by $paraviewInstall"
|
echo "Replacing ParaView_DIR setting by $paraviewInstall"
|
||||||
sed -i -e '/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" etc/apps/paraview3/bashrc
|
sed -i -e '/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" etc/apps/paraview3/bashrc
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -99,10 +99,9 @@ done
|
|||||||
# Replace the WM_MPLIB always
|
# Replace the WM_MPLIB always
|
||||||
echo "Replacing WM_MPLIB setting by SYSTEMOPENMPI"
|
echo "Replacing WM_MPLIB setting by SYSTEMOPENMPI"
|
||||||
sed -i -e '/^[^#]/s@: ${WM_MPLIB:=.*}@WM_MPLIB=SYSTEMOPENMPI@' etc/bashrc
|
sed -i -e '/^[^#]/s@: ${WM_MPLIB:=.*}@WM_MPLIB=SYSTEMOPENMPI@' etc/bashrc
|
||||||
|
|
||||||
# Replace the compilerInstall always
|
# Replace the compilerInstall always
|
||||||
echo "Replacing compilerInstall setting by system"
|
echo "Replacing compilerInstall setting by system"
|
||||||
sed -i -e '/^[^#]/s@: ${compilerInstall:=.*}@compilerInstall=system@' etc/settings.sh
|
sed -i -e '/^[^#]/s@: ${compilerInstall:=.*}@compilerInstall=system@' etc/settings.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user