28 lines
651 B
Text
28 lines
651 B
Text
|
#!/bin/sh
|
||
|
cd ${0%/*} || exit 1 # run from this directory
|
||
|
|
||
|
set -e
|
||
|
trap 'catch $? $LINENO' EXIT
|
||
|
catch() {
|
||
|
if [ "$1" != "0" ]; then
|
||
|
# error handling goes here
|
||
|
echo "Error $1 occurred on $2"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
if [ "$PWD" != "$WM_PROJECT_DIR/applications" ]
|
||
|
then
|
||
|
echo "Error: Current directory in not \$WM_PROJECT_DIR/applications"
|
||
|
echo " The environment variable are not consistent with the installation."
|
||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
set -x
|
||
|
|
||
|
cd ${FOAM_APP}/
|
||
|
wmake all solvers
|
||
|
wmake all utilities
|
||
|
|
||
|
# ----------------------------------------------------------------- end-of-file
|