2 #------------------------------------------------------------------------------
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
6 # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
8 #------------------------------------------------------------------------------
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 # foamListSourceFiles <directory>
29 # Lists source files and Make/{files,options} in given directory
32 # Not normally called directly by the user.
33 #------------------------------------------------------------------------------
37 Usage : ${0##*/} directory
39 * Lists source files and Make/{files,options} in given directory
45 # canonical form (no double and no trailing dashes)
46 packDir
=$
(echo "$1" |
sed -e 's@//*@/@g' -e 's@/$@@')
48 # check for essential directories
49 [ -d "$packDir" ] ||
{
50 echo "Error: directory $packDir does not exist" 1>&2
56 # list of files but excluding
57 # - dependent files (dep, obj, lib), archives
58 # - exclude Doxygen documentation etc
63 \
( -type f
-o -type l \
) \
72 -a ! -name "*.tar.gz" \
74 -a ! -name "*.tar.bz2" \
77 -a ! -name "core.[1-9]*" \
78 -a ! -name "libccmio*" \
82 -e '\@/platforms/@d' \
84 -e '\@/Make[.A-Za-z]*/[^/]*/@d' \
85 -e '\@/[Dd]oxygen/html/@d' \
87 -e '\@/libccmio-.*/@d' \
91 #------------------------------------------------------------------------------