-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean.sh
executable file
·70 lines (57 loc) · 1.25 KB
/
clean.sh
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh
if [ -x build/bin/klaculate ]; then
echo Running \"make clean\"
make clean
fi
CMAKEFILES=`find * -type d -name CMakeFiles`
CMAKECACHE=`find * -type f -name CMakeCache.txt`
MAKEFILES=`find * -type f -name Makefile`
DOXYFILE=`find * -type f -name Doxyfile`
INSTALL=`find * -type f -name cmake_install.cmake`
PKGLIST=`find * -type f -name install_manifest.txt`
BUILDS=`find * -type d -name build`
CORES=`find * -type f -name "*.core"`
VIMS=`find * -type f -name "*~"`
FILES="src/klaculate.h compile_commands.json"
if [ -n "${CMAKEFILES}" ]; then
echo Removing CMakeFiles
rm -r ${CMAKEFILES}
fi
if [ -n "${CMAKECACHE}" ]; then
echo Removing CMakeCache
rm ${CMAKECACHE}
fi
if [ -n "${MAKEFILES}" ]; then
echo Removing Makefiles
rm ${MAKEFILES}
fi
if [ -n "${DOXYFILE}" ]; then
echo Removing Doxyfiles
rm ${DOXYFILE}
fi
if [ -n "${INSTALL}" ]; then
echo Removing cmake_install.cmake
rm ${INSTALL}
fi
if [ -n "${PKGLIST}" ]; then
echo Removing install manifsts
rm -f ${PKGLIST}
fi
if [ -n "${BUILDS}" ]; then
echo Removing artifacts
rm -rf ${BUILDS}
fi
if [ -n "${CORES}" ]; then
echo Removing core dumps
rm ${CORES}
fi
if [ -n "${VIMS}" ]; then
echo Removing vim backups
rm ${VIMS}
fi
for F in ${FILES}
do
if [ -f $F ]; then
rm $F
fi
done