forked from ElectronicStructureLibrary/libcif
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wipeout.sh
executable file
·76 lines (68 loc) · 2.45 KB
/
wipeout.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
71
72
73
74
75
76
#!/bin/sh
#
# Copyright (C) 2015 Y. Pouillon
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
#
#
# IMPORTANT NOTE:
#
# For maintainer use only!
#
# PLEASE DO NOT EDIT THIS FILE, AS IT COULD CAUSE A SERIOUS LOSS OF DATA.
# *** YOU HAVE BEEN WARNED! ***
#
# Check that we are in the right directory
if test ! -s "./configure.ac" -o ! -s "src/vector3.h"; then
echo "wipeout: Cowardly refusing to remove something from here!"
exit 1
fi
# Make sure the whole directory tree is writable
chmod -R u+w .
# Remove temporary directories and files
echo "Removing temporary directories and files..."
find . -depth -name 'tmp*' -exec rm -rf {} \;
find . -depth -name '*.tmp' -exec rm -rf {} \;
echo "done."
# Remove autotools files
echo "Removing autotools files..."
rm -f core config.log config.status stamp-h1 config.h config.h.in*
rm -rf aclocal.m4 autom4te.cache configure confstat*
(cd config/gnu && rm -f compile config.guess config.sub depcomp install-sh ltmain.sh missing test-driver)
(cd config/m4 && rm -f libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4)
echo "done."
# Remove Makefiles and machine-generated files
echo "Removing files produced by the configure script..."
rm -f libtool
find . -name Makefile -exec rm {} \;
find . -name Makefile.in -exec rm {} \;
find . -name '*.log' -exec rm {} \;
find . -name '*.trs' -exec rm {} \;
rm -rf libcif-*.tar.gz
echo "done."
# Remove object files, libraries and programs
echo "Removing object files, libraries and programs..."
find . -depth -name '.deps' -exec rm -rf {} \;
find . -depth -name '.libs' -exec rm -rf {} \;
find . -name '*.la' -exec rm {} \;
find . -name '*.lo' -exec rm {} \;
find . -name '*.a' -exec rm {} \;
find . -name '*.o' -exec rm {} \;
echo "done."
# Remove test programs
(while read f; do rm -f $f; done) <<EOF
./src/test_error
EOF