-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean
executable file
·43 lines (36 loc) · 1.09 KB
/
clean
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
40
41
42
43
#!/bin/csh -f
set nonomatch
#
# execute all make clean in subshell to retain PWD
# we don't care about failures to ignore 'em
printf "\n\n<><><><><><><><> CLEAN BEGIN <><><><><><><><>\n\n"
make clean
printf "\n\n<><><><><><><> CLEAN COMPLETE <><><><><><><><>\n\n"
#
# clear configuration file to force a reconfigure after a clean
# Configuration file exists
if ( -e configure.upp ) then
#
# Configuration file is empty - don't overwrite backup
if ( ! -z configure.upp ) then
/bin/mv configure.upp configure.upp.backup
endif
endif
# empty file for clean op
touch configure.upp
# Now remove this to force a reconfigure
#
# clean -a -- look for anything that may not have been cleaned up and
# remove it
if ( "$1" == '-a' ) then
printf "\n\n<><><><><><><> CLEAN ALL <><><><><><><><>\n\n"
/bin/rm -rf ./netcdf_links
find . -name \*.exe -exec \rm {} \;
find . -name \*.o -exec \rm {} \;
find . -name \*.a -exec \rm {} \;
find . -name \*.mod -exec \rm {} \;
rm -rf bin
rm -rf lib
rm -rf include
printf "\n\n<><><><><><> CLEAN ALL COMPLETE <><><><><><><><>\n\n"
endif