diff --git a/bin/foamCleanTutorials b/bin/foamCleanTutorials index 8712bb25f..5777b8ecb 100755 --- a/bin/foamCleanTutorials +++ b/bin/foamCleanTutorials @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -30,15 +30,34 @@ # and all its subdirectories. # #------------------------------------------------------------------------------ +Script=$PWD/${0##*/} # Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +. "$WM_PROJECT_DIR/bin/tools/CleanFunctions" -thisScript=$0 -if [ "/${thisScript#/}" != "$thisScript" ] -then - thisScript="$PWD/$thisScript" -fi +usage() { + cat</dev/null && $thisScript ) + ( cd "$caseName" 2>/dev/null && $Script ) done fi diff --git a/bin/foamRunTutorials b/bin/foamRunTutorials index 7aabb6c48..e58f76c61 100755 --- a/bin/foamRunTutorials +++ b/bin/foamRunTutorials @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -30,18 +30,26 @@ # and all its subdirectories. # #------------------------------------------------------------------------------ +Script=$PWD/${0##*/} # Normally use standard "make" make="make" # Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions +. "$WM_PROJECT_DIR/bin/tools/RunFunctions" -thisScript=$0 -if [ "/${thisScript#/}" != "$thisScript" ] -then - thisScript="$PWD/$thisScript" -fi +usage() { + cat<