diff --git a/bin/doxyFilt b/bin/doxyFilt index c08851c53e..5f7ab3dab4 100755 --- a/bin/doxyFilt +++ b/bin/doxyFilt @@ -39,26 +39,26 @@ if [ "$#" -gt 0 ] then - filePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@../../..@ ) - # dirName=$(echo "$filePath" | sed -e 's@/[^/]*$@@' ) - dirName=${filePath%/[^/]*} - fileName=${filePath##*/} + filePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@../../..@ ) + # dirName=$(echo "$filePath" | sed -e 's@/[^/]*$@@' ) + dirName=${filePath%/[^/]*} + fileName=${filePath##*/} - awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt.awk + awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt.awk - case "$1" in - */applications/solvers/*.C | */applications/utilities/*.C ) - awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-top.awk - ;; -# */applications/solvers/*.H | */applications/utilities/*.H ) -# awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-ignore.awk -# ;; + case "$1" in + */applications/solvers/*.C | */applications/utilities/*.C ) + awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-top.awk + ;; +# */applications/solvers/*.H | */applications/utilities/*.H ) +# awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-ignore.awk +# ;; esac - awk -f $awkScript $1 | \ - sed -f $WM_PROJECT_DIR/bin/tools/doxyFilt.sed \ - -e s@%filePath%@$filePath@g \ - -e s@%fileName%@$fileName@g \ - -e s@%dirName%@$dirName@g + awk -f $awkScript $1 | \ + sed -f $WM_PROJECT_DIR/bin/tools/doxyFilt.sed \ + -e s@%filePath%@$filePath@g \ + -e s@%fileName%@$fileName@g \ + -e s@%dirName%@$dirName@g fi #------------------------------------------------------------------------------ diff --git a/bin/finddep b/bin/finddep new file mode 100755 index 0000000000..5004856dd1 --- /dev/null +++ b/bin/finddep @@ -0,0 +1,74 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# finddep +# +# Description +# find all .dep files referring to any of ... +# +#------------------------------------------------------------------------------ +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat< ... + +* find all .dep files referring to any of ... + +USAGE + exit 1 +} + + +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -*) + usage "unknown option: '$*'" + ;; + *) + break + ;; + esac +done + +[ "$#" -gt 0 ] || usage + + +find . -name '*.dep' -print | \ + while read src + do + for file in $@ + do + grep -l "$file" $src && break + done + done + +#------------------------------------------------------------------------------ diff --git a/bin/foamAllHC b/bin/foamAllHC index b42ab672d5..70c0a33407 100755 --- a/bin/foamAllHC +++ b/bin/foamAllHC @@ -27,12 +27,13 @@ # foamAllHC # # Description +# execute operation $1 on all C,H,L files # #------------------------------------------------------------------------------ if [ "$#" -gt 0 ] then - find . -name "*.[HCL]" -exec $1 {} \; -print + find . -name "*.[CHL]" -exec $1 {} \; -print fi #------------------------------------------------------------------------------ diff --git a/bin/foamCheckJobs b/bin/foamCheckJobs index c8e9e6ca1f..86143349eb 100755 --- a/bin/foamCheckJobs +++ b/bin/foamCheckJobs @@ -54,10 +54,11 @@ MACHDIR=$HOME/.OpenFOAM/${PROGNAME} DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out -if [ `uname -s` = 'Linux' ]; then - ECHO='echo -e' +if [ `uname -s` = Linux ] +then + ECHO='echo -e' else - ECHO='echo' + ECHO='echo' fi diff --git a/bin/foamCleanPath b/bin/foamCleanPath index f59747be8d..8ec4156fac 100755 --- a/bin/foamCleanPath +++ b/bin/foamCleanPath @@ -67,10 +67,10 @@ set -- $* # strip out wildcards via sed while [ "$#" -ge 1 ] do - wildcard=$1 - shift - ##DEBUG echo "remove>$wildcard<" 1>&2 - dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"` + wildcard=$1 + shift + ##DEBUG echo "remove>$wildcard<" 1>&2 + dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"` done # split on ':' (and on space as well to avoid any surprises) @@ -83,18 +83,18 @@ set -- $dirList unset dirList for dir do - ##DEBUG echo "check>$dir<" 1>&2 - #- dirs must exist - if [ -e "$dir" ] - then - #- no duplicate dirs - duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"` + ##DEBUG echo "check>$dir<" 1>&2 + #- dirs must exist + if [ -e "$dir" ] + then + #- no duplicate dirs + duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"` - if [ ! "$duplicate" ] - then - dirList="$dirList $dir" - fi - fi + if [ ! "$duplicate" ] + then + dirList="$dirList $dir" + fi + fi done # parse on whitespace diff --git a/bin/foamCleanTutorials b/bin/foamCleanTutorials index b1f41951e0..17dc5c541c 100755 --- a/bin/foamCleanTutorials +++ b/bin/foamCleanTutorials @@ -42,26 +42,23 @@ then fi # If an argument is supplied do not execute ./Allclean to avoid recursion -if [ $# = 0 -a -f "./Allclean" ] +if [ $# = 0 -a -f Allclean ] then # Specialised script. ./Allclean -elif [ -d "./system" ] +elif [ -d system ] then # Normal case. cleanCase -elif [ -d "./Make" ] +elif [ -d Make ] then # Normal application. cleanApplication else # Recurse to subdirectories - for case in * + for caseDir in * do - if [ -d $case ] - then - (cd $case && $thisScript) - fi + ( cd $caseDir 2>/dev/null && $thisScript ) done fi diff --git a/bin/foamClearPolyMesh b/bin/foamClearPolyMesh index c354ca0dd3..ea78b63258 100755 --- a/bin/foamClearPolyMesh +++ b/bin/foamClearPolyMesh @@ -32,8 +32,8 @@ # #------------------------------------------------------------------------------ usage() { - while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done - cat <&2 + while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done + cat <&2 usage: ${0##*/} [-case dir] [-region name] @@ -49,62 +49,62 @@ unset caseDir regionName # parse a single option while [ "$#" -gt 0 ] do - case "$1" in - -h | -help) - usage - ;; - -case) - [ "$#" -ge 2 ] || usage "'-case' option requires an argument" - caseDir=$2 - shift 2 - cd "$caseDir" 2>/dev/null || usage "directory does not exist: '$caseDir'" - ;; - -region) - [ "$#" -ge 2 ] || usage "'-region' option requires an argument" - regionName=$2 - shift 2 - ;; - *) - usage "unknown option/argument: '$*'" - ;; - esac + case "$1" in + -h | -help) + usage + ;; + -case) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + cd "$2" 2>/dev/null || usage "directory does not exist: '$2'" + caseDir=$2 + shift 2 + ;; + -region) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + regionName=$2 + shift 2 + ;; + *) + usage "unknown option/argument: '$*'" + ;; + esac done if [ -n "$regionName" ] then - meshDir=$regionName/polyMesh + meshDir=$regionName/polyMesh else - meshDir=polyMesh + meshDir=polyMesh fi # if -case was specified: insist upon 'constant/polyMesh' if [ -n "$caseDir" ] then - if [ -d constant/$meshDir ] - then - # use constant/polyMesh - meshDir=constant/$meshDir - else - echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2 - exit 1 - fi + if [ -d constant/$meshDir ] + then + # use constant/polyMesh + meshDir=constant/$meshDir + else + echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2 + exit 1 + fi else - if [ -d constant/$meshDir ] - then - # use constant/polyMesh - meshDir=constant/$meshDir - elif [ -d $meshDir ] - then - # likely already in constant/ - do not adjust anything - : - elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ] - then - # apparently already within polyMesh/ - meshDir=. - else - echo "Error: no appropriate 'polyMesh/' directory found" 1>&2 - exit 1 - fi + if [ -d constant/$meshDir ] + then + # use constant/polyMesh + meshDir=constant/$meshDir + elif [ -d $meshDir ] + then + # likely already in constant/ - do not adjust anything + : + elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ] + then + # apparently already within polyMesh/ + meshDir=. + else + echo "Error: no appropriate 'polyMesh/' directory found" 1>&2 + exit 1 + fi fi @@ -114,21 +114,21 @@ fi echo "Clearing ${caseDir:-.}/$meshDir" 1>&2 for i in \ - points \ - faces \ - owner \ - neighbour \ - cells \ - boundary \ - pointZones \ - faceZones \ - cellZones \ - meshModifiers \ - parallelData \ - sets \ + points \ + faces \ + owner \ + neighbour \ + cells \ + boundary \ + pointZones \ + faceZones \ + cellZones \ + meshModifiers \ + parallelData \ + sets \ ; do - rm -rf $meshDir/$i + rm -rf $meshDir/$i done #------------------------------------------------------------------------------ diff --git a/bin/foamEbrowse b/bin/foamEbrowse index aea1cd16f6..be81823945 100755 --- a/bin/foamEbrowse +++ b/bin/foamEbrowse @@ -45,8 +45,8 @@ fi trap 'rm -f $headersFile $sourcesFile 2>/dev/null; exit 0' EXIT TERM INT cd $WM_PROJECT_DIR -find -H . -name "*.H" | fgrep -v "lnInclude" > $headersFile -find -H . -name "*.C" | fgrep -v "lnInclude" > $sourcesFile +find -H . -name "*.H" | fgrep -v lnInclude > $headersFile +find -H . -name "*.C" | fgrep -v lnInclude > $sourcesFile ebrowse --files=$headersFile --files=$sourcesFile --output-file=.ebrowse #------------------------------------------------------------------------------ diff --git a/bin/foamProcessInfo b/bin/foamProcessInfo index 6bd5e89ba1..61c855fd11 100755 --- a/bin/foamProcessInfo +++ b/bin/foamProcessInfo @@ -43,14 +43,16 @@ PROGNAME=`basename $0` TMPFILE=/tmp/${PROGNAME}$$.tmp AWKFILE=/tmp/${PROGNAME}$$.awk -if [ `uname -s` = 'Linux' ]; then - ECHO='echo -e' +if [ `uname -s` = Linux ] +then + ECHO='echo -e' else - ECHO='echo' + ECHO='echo' fi -if [ $# -ne 1 ]; then +if [ $# -ne 1 ] +then echo "Error : $PROGNAME : insufficient arguments" 1>&2 exit 1 fi diff --git a/bin/foamSolverSweeps b/bin/foamSolverSweeps index 63394b0e26..618ad1e9d7 100755 --- a/bin/foamSolverSweeps +++ b/bin/foamSolverSweeps @@ -27,7 +27,7 @@ # foamSolverSweeps # # Description -# +# #------------------------------------------------------------------------------ #-- settings diff --git a/bin/mpirunDebug b/bin/mpirunDebug index 8d0be2375c..8d086a8ea0 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -1,25 +1,50 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. # -# Driver script to run mpi jobs with the processes in separate -# windows or to separate log files. -# Requires bash on all processors. +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# mpirunDebug +# +# Description +# Driver script to run mpi jobs with the processes in separate +# windows or to separate log files. +# Requires bash on all processors. +#------------------------------------------------------------------------------ - -PROGNAME=`basename $0` -PROGDIR=`dirname $0` - -if [ `uname -s` = 'Linux' ]; then - ECHO='echo -e' +if [ `uname -s` = Linux ] +then + ECHO='echo -e' else - ECHO='echo' + ECHO='echo' fi printUsage() { - echo "" - echo "Usage: $PROGNAME -np
" - echo "" - echo "This will run like mpirun but with each process in an xterm" + echo "" + echo "Usage: ${0##*/} -np
" + echo "" + echo "This will run like mpirun but with each process in an xterm" } nProcs='' @@ -30,7 +55,8 @@ while [ "$1" != "" ]; do echo "$1" case $1 in -np) - nProcs=$2;shift + nProcs=$2 + shift ;; *) if [ ! "$exec" ]; then @@ -195,3 +221,5 @@ echo "" $ECHO "Press return to execute.\c" read dummy exec $cmd + +#------------------------------------------------------------------------------ diff --git a/bin/rmclassall b/bin/rmclassall index de45bb2b2b..ea14cf0a42 100755 --- a/bin/rmclassall +++ b/bin/rmclassall @@ -1,4 +1,34 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# rmclassall +# +# Description +# remove all .class files +#------------------------------------------------------------------------------ # default is pwd if [ "$#" -eq 0 ] @@ -11,6 +41,7 @@ then exit 1 fi + for i do if [ -d "$i" ] diff --git a/bin/rmcore b/bin/rmcore index dddf09406c..95cfc01b6e 100755 --- a/bin/rmcore +++ b/bin/rmcore @@ -1,4 +1,34 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# rmcore +# +# Description +# remove all core files +#------------------------------------------------------------------------------ # default is pwd if [ "$#" -eq 0 ] @@ -11,6 +41,7 @@ then exit 1 fi + for i do if [ -d "$i" ] diff --git a/bin/rmdepall b/bin/rmdepall index b0f1876b45..85b478d587 100755 --- a/bin/rmdepall +++ b/bin/rmdepall @@ -1,18 +1,68 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# rmdepall +# +# Description +# Remove all .dep files or remove .dep files referring to +#------------------------------------------------------------------------------ +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<&2 +usage: ${0##*/} [file] -if [ "$1" = "-h" -o "$1" = "-help" -o "$#" -gt 1 ] -then - echo "Usage: ${0##*/} : remove all .dep files" - echo " ${0##*/} : remove all .dep files referring to " +Remove all .dep files or remove .dep files referring to + +USAGE exit 1 -fi +} + +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -*) + usage "unknown option: '$*'" + ;; + *) + break + ;; + esac +done + if [ "$#" -eq 0 ] then - echo "removing all .dep files" + echo "removing all .dep files ..." find . -name '*.dep' -print | xargs -t rm 2>/dev/null else - echo "removing all .dep files containing $1..." + echo "removing .dep files referring to $1 ..." find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \; fi diff --git a/bin/rmoall b/bin/rmoall index d49a6f4a05..c689caf389 100755 --- a/bin/rmoall +++ b/bin/rmoall @@ -1,4 +1,34 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# rmoall +# +# Description +# remove all .o files +#------------------------------------------------------------------------------ # default is pwd if [ "$#" -eq 0 ] @@ -11,6 +41,7 @@ then exit 1 fi + for i do if [ -d "$i" ] diff --git a/bin/rm~all b/bin/rm~all index ab8b4b17c7..d11004e351 100755 --- a/bin/rm~all +++ b/bin/rm~all @@ -1,4 +1,34 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# rm~all +# +# Description +# remove all *~ files +#------------------------------------------------------------------------------ # default is pwd if [ "$#" -eq 0 ] @@ -11,6 +41,7 @@ then exit 1 fi + for i do if [ -d "$i" ] diff --git a/bin/touchapp b/bin/touchapp index 6c76f2208a..590bd7fb48 100755 --- a/bin/touchapp +++ b/bin/touchapp @@ -1,4 +1,34 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# touchapp +# +# Description +# touch FOAM_APPBIN +#------------------------------------------------------------------------------ if [ "$#" -ne 0 ] then @@ -7,6 +37,7 @@ then exit 1 fi + if [ -d "$FOAM_APPBIN" ] then echo "touching FOAM_APPBIN: $FOAM_APPBIN" diff --git a/bin/touchdep b/bin/touchdep index 497fae79ee..f67949e1d2 100755 --- a/bin/touchdep +++ b/bin/touchdep @@ -1,24 +1,55 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# touchdep +# +# Description +# touch all .dep files +#------------------------------------------------------------------------------ # default is pwd if [ "$#" -eq 0 ] then - set -- . + set -- . elif [ "$1" = "-h" -o "$1" = "-help" ] then - echo "Usage: ${0##*/} [dir1] .. [dirN]" - echo " touch all .dep files" - exit 1 + echo "Usage: ${0##*/} [dir1] .. [dirN]" + echo " touch all .dep files" + exit 1 fi + for i do - if [ -d "$i" ] - then - echo "touching all .dep files: $i" - find $i -name '*.dep' -print | xargs -t touch - else - echo "no directory: $i" - fi + if [ -d "$i" ] + then + echo "touching all .dep files: $i" + find $i -name '*.dep' -print | xargs -t touch + else + echo "no directory: $i" + fi done #------------------------------------------------------------------------------ diff --git a/bin/touchlib b/bin/touchlib index ef4a7cc6fe..2c90865748 100755 --- a/bin/touchlib +++ b/bin/touchlib @@ -1,17 +1,48 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# touchlib +# +# Description +# touch FOAM_LIBBIN +#------------------------------------------------------------------------------ if [ "$#" -ne 0 ] then - echo "Usage: ${0##*/}" - echo " touch FOAM_LIBBIN" - exit 1 + echo "Usage: ${0##*/}" + echo " touch FOAM_LIBBIN" + exit 1 fi + if [ -d "$FOAM_LIBBIN" ] then - echo "touching FOAM_LIBBIN: $FOAM_LIBBIN" - touch $FOAM_LIBBIN/* $FOAM_LIBBIN/*/* + echo "touching FOAM_LIBBIN: $FOAM_LIBBIN" + touch $FOAM_LIBBIN/* $FOAM_LIBBIN/*/* else - echo "no FOAM_LIBBIN: $FOAM_LIBBIN" + echo "no FOAM_LIBBIN: $FOAM_LIBBIN" fi #------------------------------------------------------------------------------ diff --git a/bin/toucho b/bin/toucho index 0236225d73..43959e35f7 100755 --- a/bin/toucho +++ b/bin/toucho @@ -1,24 +1,55 @@ #!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# toucho +# +# Description +# touch all .o files +#------------------------------------------------------------------------------ # default is pwd if [ "$#" -eq 0 ] then - set -- . + set -- . elif [ "$1" = "-h" -o "$1" = "-help" ] then - echo "Usage: ${0##*/} [dir1] .. [dirN]" - echo " touch all .o files" - exit 1 + echo "Usage: ${0##*/} [dir1] .. [dirN]" + echo " touch all .o files" + exit 1 fi + for i do - if [ -d "$i" ] - then - echo "touching all .o files: $i" - find $i -name '*.o' -print | xargs -t touch - else - echo "no directory: $i" - fi + if [ -d "$i" ] + then + echo "touching all .o files: $i" + find $i -name '*.o' -print | xargs -t touch + else + echo "no directory: $i" + fi done #------------------------------------------------------------------------------