mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
some cosmetic updates
- remove whitespace at eol - add function parameter documentation
This commit is contained in:
parent
9b91e2f20b
commit
f43bac8efa
@ -7,15 +7,18 @@ set -e
|
||||
#set -x
|
||||
|
||||
|
||||
# Get the absolute path from a (potentially) relative path
|
||||
# $1 = relative path
|
||||
# Prints the absolute path to stdout for capture
|
||||
getAbsPath() {
|
||||
local MY_PATH=$1
|
||||
local ORIG_PATH=`pwd`
|
||||
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"
|
||||
cd "$ORIG_PATH"
|
||||
|
||||
if [ -z "$MY_PATH" ] ; then
|
||||
echo "Script path became something strange: '$SCRIPT_PATH'"
|
||||
echo "Script path became something strange: '$SCRIPT_PATH'"
|
||||
exit 1 # fail
|
||||
fi
|
||||
echo "$MY_PATH"
|
||||
@ -49,7 +52,7 @@ while getopts "d:w:p:t:h" arg; do
|
||||
echo "OPM_DATA ${OPTARG}"
|
||||
OPM_DATA=${OPTARG}
|
||||
;;
|
||||
w) # Workspace directory to use for opm-simultors
|
||||
w) # Workspace directory to use for opm-simulators
|
||||
echo "WORKSPACE ${OPTARG}"
|
||||
WORKSPACE=${OPTARG}
|
||||
;;
|
||||
@ -69,8 +72,8 @@ while getopts "d:w:p:t:h" arg; do
|
||||
done
|
||||
|
||||
|
||||
if [ -z "$OPM_DATA" ]; then
|
||||
echo "No OPM_DATA dir, will clone using network (slow)";
|
||||
if [ -z "$OPM_DATA" ]; then
|
||||
echo "No OPM_DATA dir, will clone using network (slow)";
|
||||
fi
|
||||
WORKSPACE=`getAbsPath "$WORKSPACE"`
|
||||
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
OPM_DATA_ROOT=$1
|
||||
|
||||
# Copy results from a test run to refence dir
|
||||
# $1 = source directory to copy data from
|
||||
# $2 = destination directory to copy data to
|
||||
# $3 = base file name for files to copy
|
||||
# $4...$@ = file types to copy
|
||||
copyToReferenceDir () {
|
||||
SRC_DIR=$1
|
||||
DST_DIR=$2;
|
||||
|
Loading…
Reference in New Issue
Block a user