copied from preCICE tutorials
This commit is contained in:
parent
46a7e98752
commit
3f1b1a6d0f
68 changed files with 156449 additions and 0 deletions
36
preCICE_tools/run-dealii.sh
Executable file
36
preCICE_tools/run-dealii.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
set -e -u
|
||||
|
||||
EXE=""
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-e=* | --exec=*)
|
||||
EXE="${i#*=}"
|
||||
shift # past argument=value
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# If the executable has been defined
|
||||
if [ -n "${EXE}" ]; then
|
||||
"${EXE}" parameters.prm
|
||||
exit 0
|
||||
fi
|
||||
|
||||
EXE="elasticity"
|
||||
# If it is in the global path
|
||||
if [ -n "$(command -v "${EXE}")" ]; then
|
||||
"${EXE}" parameters.prm
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# If it has been copied to the local directory
|
||||
if test -f "elasticity"; then
|
||||
./"${EXE}" parameters.prm
|
||||
else
|
||||
echo "Unable to find the executable ${EXE}. Either specify the executable explicitly (-e=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue