added command bin/finddep, added copyright headers to misc bin/ scripts
This commit is contained in:
parent
7f168dc93c
commit
172b862c47
34
bin/doxyFilt
34
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
|
||||
#------------------------------------------------------------------------------
|
||||
|
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
|
||||
#
|
||||
# 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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
@ -27,7 +27,7 @@
|
||||
# foamSolverSweeps
|
||||
#
|
||||
# Description
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#-- settings
|
||||
|
@ -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 <dd> <executable> <args>"
|
||||
echo ""
|
||||
echo "This will run like mpirun but with each process in an xterm"
|
||||
echo ""
|
||||
echo "Usage: ${0##*/} -np <dd> <executable> <args>"
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -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" ]
|
||||
|
31
bin/rmcore
31
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" ]
|
||||
|
64
bin/rmdepall
64
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 <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 ]
|
||||
then
|
||||
echo "Usage: ${0##*/} : remove all .dep files"
|
||||
echo " ${0##*/} <file> : remove all .dep files referring to <file>"
|
||||
Remove all .dep files or remove .dep files referring to <file>
|
||||
|
||||
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
|
||||
|
||||
|
31
bin/rmoall
31
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" ]
|
||||
|
31
bin/rm~all
31
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" ]
|
||||
|
31
bin/touchapp
31
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"
|
||||
|
53
bin/touchdep
53
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
|
||||
#------------------------------------------------------------------------------
|
||||
|
43
bin/touchlib
43
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
|
||||
#------------------------------------------------------------------------------
|
||||
|
53
bin/toucho
53
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
|
||||
#------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user