forked from solids4foam/solids4foam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAllwclean
executable file
·39 lines (31 loc) · 915 Bytes
/
Allwclean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
cd "${0%/*}" || exit # Run from this directory
# Check if OpenFOAM/FOAM has been sourced
if [[ -z "${WM_PROJECT}" ]]
then
echo "Please source the OpenFOAM/FOAM bashrc first!"
exit 1
else
allowed_ver=("4.1" "9" "v2012")
if ! [[ " ${allowed_ver[*]} " == *" $WM_PROJECT_VERSION "* ]]; then
echo "Unsupported OpenFOAM version sourced!"
fi
fi
# Clean ThirdParty
(cd ThirdParty && ./Allwclean)
# Clean libraries
(cd src && ./Allwclean)
# Clean applications
(cd applications && ./Allwclean)
# Clean all tutorials
(cd tutorials && ./Allclean)
# Clear the tutorialsTest directory
if [[ -d tutorialsTest ]]
then
echo; echo "Removing tutorialsTest"
rm -rf tutorialsTest
fi
# Clear all build logs
echo; echo "Removing all log.Allwmake build logs"; echo
find . -name log.Allwmake | xargs rm
#------------------------------------------------------------------------------