mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
added command bin/finddep, added copyright headers to misc bin/ scripts
This commit is contained in:
34
bin/doxyFilt
34
bin/doxyFilt
@ -39,26 +39,26 @@
|
|||||||
|
|
||||||
if [ "$#" -gt 0 ]
|
if [ "$#" -gt 0 ]
|
||||||
then
|
then
|
||||||
filePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@../../..@ )
|
filePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@../../..@ )
|
||||||
# dirName=$(echo "$filePath" | sed -e 's@/[^/]*$@@' )
|
# dirName=$(echo "$filePath" | sed -e 's@/[^/]*$@@' )
|
||||||
dirName=${filePath%/[^/]*}
|
dirName=${filePath%/[^/]*}
|
||||||
fileName=${filePath##*/}
|
fileName=${filePath##*/}
|
||||||
|
|
||||||
awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt.awk
|
awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt.awk
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
*/applications/solvers/*.C | */applications/utilities/*.C )
|
*/applications/solvers/*.C | */applications/utilities/*.C )
|
||||||
awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-top.awk
|
awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-top.awk
|
||||||
;;
|
;;
|
||||||
# */applications/solvers/*.H | */applications/utilities/*.H )
|
# */applications/solvers/*.H | */applications/utilities/*.H )
|
||||||
# awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-ignore.awk
|
# awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-ignore.awk
|
||||||
# ;;
|
# ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
awk -f $awkScript $1 | \
|
awk -f $awkScript $1 | \
|
||||||
sed -f $WM_PROJECT_DIR/bin/tools/doxyFilt.sed \
|
sed -f $WM_PROJECT_DIR/bin/tools/doxyFilt.sed \
|
||||||
-e s@%filePath%@$filePath@g \
|
-e s@%filePath%@$filePath@g \
|
||||||
-e s@%fileName%@$fileName@g \
|
-e s@%fileName%@$fileName@g \
|
||||||
-e s@%dirName%@$dirName@g
|
-e s@%dirName%@$dirName@g
|
||||||
fi
|
fi
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
74
bin/finddep
Executable file
74
bin/finddep
Executable file
@ -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 <file1> ... <fileN>
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
usage() {
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
usage: ${0##*/} <file1> ... <fileN>
|
||||||
|
|
||||||
|
* find all .dep files referring to any of <file1> ... <fileN>
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -27,12 +27,13 @@
|
|||||||
# foamAllHC
|
# foamAllHC
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
|
# execute operation $1 on all C,H,L files
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$#" -gt 0 ]
|
if [ "$#" -gt 0 ]
|
||||||
then
|
then
|
||||||
find . -name "*.[HCL]" -exec $1 {} \; -print
|
find . -name "*.[CHL]" -exec $1 {} \; -print
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -54,10 +54,11 @@ MACHDIR=$HOME/.OpenFOAM/${PROGNAME}
|
|||||||
DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out
|
DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out
|
||||||
|
|
||||||
|
|
||||||
if [ `uname -s` = 'Linux' ]; then
|
if [ `uname -s` = Linux ]
|
||||||
ECHO='echo -e'
|
then
|
||||||
|
ECHO='echo -e'
|
||||||
else
|
else
|
||||||
ECHO='echo'
|
ECHO='echo'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -67,10 +67,10 @@ set -- $*
|
|||||||
# strip out wildcards via sed
|
# strip out wildcards via sed
|
||||||
while [ "$#" -ge 1 ]
|
while [ "$#" -ge 1 ]
|
||||||
do
|
do
|
||||||
wildcard=$1
|
wildcard=$1
|
||||||
shift
|
shift
|
||||||
##DEBUG echo "remove>$wildcard<" 1>&2
|
##DEBUG echo "remove>$wildcard<" 1>&2
|
||||||
dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"`
|
dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"`
|
||||||
done
|
done
|
||||||
|
|
||||||
# split on ':' (and on space as well to avoid any surprises)
|
# split on ':' (and on space as well to avoid any surprises)
|
||||||
@ -83,18 +83,18 @@ set -- $dirList
|
|||||||
unset dirList
|
unset dirList
|
||||||
for dir
|
for dir
|
||||||
do
|
do
|
||||||
##DEBUG echo "check>$dir<" 1>&2
|
##DEBUG echo "check>$dir<" 1>&2
|
||||||
#- dirs must exist
|
#- dirs must exist
|
||||||
if [ -e "$dir" ]
|
if [ -e "$dir" ]
|
||||||
then
|
then
|
||||||
#- no duplicate dirs
|
#- no duplicate dirs
|
||||||
duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"`
|
duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"`
|
||||||
|
|
||||||
if [ ! "$duplicate" ]
|
if [ ! "$duplicate" ]
|
||||||
then
|
then
|
||||||
dirList="$dirList $dir"
|
dirList="$dirList $dir"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# parse on whitespace
|
# parse on whitespace
|
||||||
|
|||||||
@ -42,26 +42,23 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If an argument is supplied do not execute ./Allclean to avoid recursion
|
# If an argument is supplied do not execute ./Allclean to avoid recursion
|
||||||
if [ $# = 0 -a -f "./Allclean" ]
|
if [ $# = 0 -a -f Allclean ]
|
||||||
then
|
then
|
||||||
# Specialised script.
|
# Specialised script.
|
||||||
./Allclean
|
./Allclean
|
||||||
elif [ -d "./system" ]
|
elif [ -d system ]
|
||||||
then
|
then
|
||||||
# Normal case.
|
# Normal case.
|
||||||
cleanCase
|
cleanCase
|
||||||
elif [ -d "./Make" ]
|
elif [ -d Make ]
|
||||||
then
|
then
|
||||||
# Normal application.
|
# Normal application.
|
||||||
cleanApplication
|
cleanApplication
|
||||||
else
|
else
|
||||||
# Recurse to subdirectories
|
# Recurse to subdirectories
|
||||||
for case in *
|
for caseDir in *
|
||||||
do
|
do
|
||||||
if [ -d $case ]
|
( cd $caseDir 2>/dev/null && $thisScript )
|
||||||
then
|
|
||||||
(cd $case && $thisScript)
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,8 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done
|
||||||
cat <<USAGE 1>&2
|
cat <<USAGE 1>&2
|
||||||
|
|
||||||
usage: ${0##*/} [-case dir] [-region name]
|
usage: ${0##*/} [-case dir] [-region name]
|
||||||
|
|
||||||
@ -49,62 +49,62 @@ unset caseDir regionName
|
|||||||
# parse a single option
|
# parse a single option
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
-h | -help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
-case)
|
-case)
|
||||||
[ "$#" -ge 2 ] || usage "'-case' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
caseDir=$2
|
cd "$2" 2>/dev/null || usage "directory does not exist: '$2'"
|
||||||
shift 2
|
caseDir=$2
|
||||||
cd "$caseDir" 2>/dev/null || usage "directory does not exist: '$caseDir'"
|
shift 2
|
||||||
;;
|
;;
|
||||||
-region)
|
-region)
|
||||||
[ "$#" -ge 2 ] || usage "'-region' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
regionName=$2
|
regionName=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
usage "unknown option/argument: '$*'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$regionName" ]
|
if [ -n "$regionName" ]
|
||||||
then
|
then
|
||||||
meshDir=$regionName/polyMesh
|
meshDir=$regionName/polyMesh
|
||||||
else
|
else
|
||||||
meshDir=polyMesh
|
meshDir=polyMesh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if -case was specified: insist upon 'constant/polyMesh'
|
# if -case was specified: insist upon 'constant/polyMesh'
|
||||||
if [ -n "$caseDir" ]
|
if [ -n "$caseDir" ]
|
||||||
then
|
then
|
||||||
if [ -d constant/$meshDir ]
|
if [ -d constant/$meshDir ]
|
||||||
then
|
then
|
||||||
# use constant/polyMesh
|
# use constant/polyMesh
|
||||||
meshDir=constant/$meshDir
|
meshDir=constant/$meshDir
|
||||||
else
|
else
|
||||||
echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2
|
echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -d constant/$meshDir ]
|
if [ -d constant/$meshDir ]
|
||||||
then
|
then
|
||||||
# use constant/polyMesh
|
# use constant/polyMesh
|
||||||
meshDir=constant/$meshDir
|
meshDir=constant/$meshDir
|
||||||
elif [ -d $meshDir ]
|
elif [ -d $meshDir ]
|
||||||
then
|
then
|
||||||
# likely already in constant/ - do not adjust anything
|
# likely already in constant/ - do not adjust anything
|
||||||
:
|
:
|
||||||
elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ]
|
elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ]
|
||||||
then
|
then
|
||||||
# apparently already within polyMesh/
|
# apparently already within polyMesh/
|
||||||
meshDir=.
|
meshDir=.
|
||||||
else
|
else
|
||||||
echo "Error: no appropriate 'polyMesh/' directory found" 1>&2
|
echo "Error: no appropriate 'polyMesh/' directory found" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -114,21 +114,21 @@ fi
|
|||||||
echo "Clearing ${caseDir:-.}/$meshDir" 1>&2
|
echo "Clearing ${caseDir:-.}/$meshDir" 1>&2
|
||||||
|
|
||||||
for i in \
|
for i in \
|
||||||
points \
|
points \
|
||||||
faces \
|
faces \
|
||||||
owner \
|
owner \
|
||||||
neighbour \
|
neighbour \
|
||||||
cells \
|
cells \
|
||||||
boundary \
|
boundary \
|
||||||
pointZones \
|
pointZones \
|
||||||
faceZones \
|
faceZones \
|
||||||
cellZones \
|
cellZones \
|
||||||
meshModifiers \
|
meshModifiers \
|
||||||
parallelData \
|
parallelData \
|
||||||
sets \
|
sets \
|
||||||
;
|
;
|
||||||
do
|
do
|
||||||
rm -rf $meshDir/$i
|
rm -rf $meshDir/$i
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -45,8 +45,8 @@ fi
|
|||||||
trap 'rm -f $headersFile $sourcesFile 2>/dev/null; exit 0' EXIT TERM INT
|
trap 'rm -f $headersFile $sourcesFile 2>/dev/null; exit 0' EXIT TERM INT
|
||||||
|
|
||||||
cd $WM_PROJECT_DIR
|
cd $WM_PROJECT_DIR
|
||||||
find -H . -name "*.H" | fgrep -v "lnInclude" > $headersFile
|
find -H . -name "*.H" | fgrep -v lnInclude > $headersFile
|
||||||
find -H . -name "*.C" | fgrep -v "lnInclude" > $sourcesFile
|
find -H . -name "*.C" | fgrep -v lnInclude > $sourcesFile
|
||||||
ebrowse --files=$headersFile --files=$sourcesFile --output-file=.ebrowse
|
ebrowse --files=$headersFile --files=$sourcesFile --output-file=.ebrowse
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -43,14 +43,16 @@ PROGNAME=`basename $0`
|
|||||||
TMPFILE=/tmp/${PROGNAME}$$.tmp
|
TMPFILE=/tmp/${PROGNAME}$$.tmp
|
||||||
AWKFILE=/tmp/${PROGNAME}$$.awk
|
AWKFILE=/tmp/${PROGNAME}$$.awk
|
||||||
|
|
||||||
if [ `uname -s` = 'Linux' ]; then
|
if [ `uname -s` = Linux ]
|
||||||
ECHO='echo -e'
|
then
|
||||||
|
ECHO='echo -e'
|
||||||
else
|
else
|
||||||
ECHO='echo'
|
ECHO='echo'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]
|
||||||
|
then
|
||||||
echo "Error : $PROGNAME : insufficient arguments" 1>&2
|
echo "Error : $PROGNAME : insufficient arguments" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,25 +1,50 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
# windows or to separate log files.
|
# under the terms of the GNU General Public License as published by the
|
||||||
# Requires bash on all processors.
|
# 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.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ `uname -s` = Linux ]
|
||||||
PROGNAME=`basename $0`
|
then
|
||||||
PROGDIR=`dirname $0`
|
ECHO='echo -e'
|
||||||
|
|
||||||
if [ `uname -s` = 'Linux' ]; then
|
|
||||||
ECHO='echo -e'
|
|
||||||
else
|
else
|
||||||
ECHO='echo'
|
ECHO='echo'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
printUsage() {
|
printUsage() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: $PROGNAME -np <dd> <executable> <args>"
|
echo "Usage: ${0##*/} -np <dd> <executable> <args>"
|
||||||
echo ""
|
echo ""
|
||||||
echo "This will run like mpirun but with each process in an xterm"
|
echo "This will run like mpirun but with each process in an xterm"
|
||||||
}
|
}
|
||||||
|
|
||||||
nProcs=''
|
nProcs=''
|
||||||
@ -30,7 +55,8 @@ while [ "$1" != "" ]; do
|
|||||||
echo "$1"
|
echo "$1"
|
||||||
case $1 in
|
case $1 in
|
||||||
-np)
|
-np)
|
||||||
nProcs=$2;shift
|
nProcs=$2
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ ! "$exec" ]; then
|
if [ ! "$exec" ]; then
|
||||||
@ -195,3 +221,5 @@ echo ""
|
|||||||
$ECHO "Press return to execute.\c"
|
$ECHO "Press return to execute.\c"
|
||||||
read dummy
|
read dummy
|
||||||
exec $cmd
|
exec $cmd
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,4 +1,34 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
@ -11,6 +41,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
|
|||||||
31
bin/rmcore
31
bin/rmcore
@ -1,4 +1,34 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
@ -11,6 +41,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
|
|||||||
64
bin/rmdepall
64
bin/rmdepall
@ -1,18 +1,68 @@
|
|||||||
#!/bin/sh
|
#!/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 <file>
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
usage() {
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE 1>&2
|
||||||
|
usage: ${0##*/} [file]
|
||||||
|
|
||||||
if [ "$1" = "-h" -o "$1" = "-help" -o "$#" -gt 1 ]
|
Remove all .dep files or remove .dep files referring to <file>
|
||||||
then
|
|
||||||
echo "Usage: ${0##*/} : remove all .dep files"
|
USAGE
|
||||||
echo " ${0##*/} <file> : remove all .dep files referring to <file>"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
# parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
usage "unknown option: '$*'"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "removing all .dep files"
|
echo "removing all .dep files ..."
|
||||||
find . -name '*.dep' -print | xargs -t rm 2>/dev/null
|
find . -name '*.dep' -print | xargs -t rm 2>/dev/null
|
||||||
else
|
else
|
||||||
echo "removing all .dep files containing $1..."
|
echo "removing .dep files referring to $1 ..."
|
||||||
find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
|
find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
31
bin/rmoall
31
bin/rmoall
@ -1,4 +1,34 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
@ -11,6 +41,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
|
|||||||
31
bin/rm~all
31
bin/rm~all
@ -1,4 +1,34 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
@ -11,6 +41,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
|
|||||||
31
bin/touchapp
31
bin/touchapp
@ -1,4 +1,34 @@
|
|||||||
#!/bin/sh
|
#!/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 ]
|
if [ "$#" -ne 0 ]
|
||||||
then
|
then
|
||||||
@ -7,6 +37,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -d "$FOAM_APPBIN" ]
|
if [ -d "$FOAM_APPBIN" ]
|
||||||
then
|
then
|
||||||
echo "touching FOAM_APPBIN: $FOAM_APPBIN"
|
echo "touching FOAM_APPBIN: $FOAM_APPBIN"
|
||||||
|
|||||||
53
bin/touchdep
53
bin/touchdep
@ -1,24 +1,55 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
set -- .
|
set -- .
|
||||||
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
||||||
echo " touch all .dep files"
|
echo " touch all .dep files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
then
|
then
|
||||||
echo "touching all .dep files: $i"
|
echo "touching all .dep files: $i"
|
||||||
find $i -name '*.dep' -print | xargs -t touch
|
find $i -name '*.dep' -print | xargs -t touch
|
||||||
else
|
else
|
||||||
echo "no directory: $i"
|
echo "no directory: $i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
43
bin/touchlib
43
bin/touchlib
@ -1,17 +1,48 @@
|
|||||||
#!/bin/sh
|
#!/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 ]
|
if [ "$#" -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/}"
|
echo "Usage: ${0##*/}"
|
||||||
echo " touch FOAM_LIBBIN"
|
echo " touch FOAM_LIBBIN"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -d "$FOAM_LIBBIN" ]
|
if [ -d "$FOAM_LIBBIN" ]
|
||||||
then
|
then
|
||||||
echo "touching FOAM_LIBBIN: $FOAM_LIBBIN"
|
echo "touching FOAM_LIBBIN: $FOAM_LIBBIN"
|
||||||
touch $FOAM_LIBBIN/* $FOAM_LIBBIN/*/*
|
touch $FOAM_LIBBIN/* $FOAM_LIBBIN/*/*
|
||||||
else
|
else
|
||||||
echo "no FOAM_LIBBIN: $FOAM_LIBBIN"
|
echo "no FOAM_LIBBIN: $FOAM_LIBBIN"
|
||||||
fi
|
fi
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
53
bin/toucho
53
bin/toucho
@ -1,24 +1,55 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
set -- .
|
set -- .
|
||||||
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
||||||
echo " touch all .o files"
|
echo " touch all .o files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
then
|
then
|
||||||
echo "touching all .o files: $i"
|
echo "touching all .o files: $i"
|
||||||
find $i -name '*.o' -print | xargs -t touch
|
find $i -name '*.o' -print | xargs -t touch
|
||||||
else
|
else
|
||||||
echo "no directory: $i"
|
echo "no directory: $i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user