Merge /u/hjasak/foam-extend-3.2/ branch feature/dynamicImmersedBounday into nextRelease
[foam-extend-3.2.git] / wmake / wcleanAllButLibBinLnInclude
blobb999982148faac1bb64b2656dc46abba6556a72e
1 #!/bin/sh
2 #------------------------------------------------------------------------------
3 # ========= |
4 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / O peration | Version: 3.2
6 # \\ / A nd | Web: http://www.foam-extend.org
7 # \\/ M anipulation | For copyright notice see file Copyright
8 #------------------------------------------------------------------------------
9 # License
10 # This file is part of foam-extend.
12 # foam-extend is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation, either version 3 of the License, or (at your
15 # option) any later version.
17 # foam-extend is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 # Script
26 # wcleanAllButLibBinLnInclude
28 # Description
29 # search all the directories below the current for the object file
30 # directories of all machines and *.dep files, and delete them.
31 # This scripts is the same as wcleanAll, except that it leaves
32 # the lib, applications/bin, and lnInclude directories untouched.
33 # The purpose is to minimize an installation, while keeping it fully
34 # operational and keeping the possibility to compile user code.
36 #------------------------------------------------------------------------------
37 if [ "$1" = "-h" -o "$1" = "-help" ]
38 then
39 echo "Usage: ${0##*/}"
40 echo
41 echo " Remove all object files and *.dep files"
42 echo " Leaves lib, applications/bin and lnInclude untouched"
43 exit 1
46 [ -d bin -a -d src ] || {
47 echo "${0##*/}: not in the project top level directory"
48 exit 1
51 #Removed, compared to wcleanAll:
52 #for dir in lib applications/bin
53 #do
54 # echo "Removing $dir/"
55 # [ -d $dir ] && rm -rf $dir/*
56 #done
58 echo "Removing *.dep files"
59 find . -name '*.dep' -exec rm {} \;
61 echo "Cleaning Make subdirectories"
62 find `find . -depth \( -name "Make.[A-Za-z]*" -o -name Make \) -type d -print` -depth \( -type d ! -name "*Make.[A-Za-z]*" ! -name "*Make" \( ! -path '*.svn*' \) \) -exec rm -rf {} \;
64 #Removed, compared to wcleanAll:
65 #echo "Removing lnInclude and intermediate directories"
66 #find . -depth -type d \( -name lnInclude -o -name ii_files -o -name Templates.DB \) -exec rm -rf {} \;
68 echo "Removing misc files"
69 find . \( -name exe -o -name log -o -name so_locations \) -exec rm {} \;
71 ( cd tutorials && ./Allclean )
73 #------------------------------------------------------------------------------