-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathautoclean
More file actions
executable file
·41 lines (31 loc) · 850 Bytes
/
autoclean
File metadata and controls
executable file
·41 lines (31 loc) · 850 Bytes
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
#!/bin/sh
[ -f config.sh ] || { echo "Unable to find config.sh"; exit 1; }
. ./config.sh
echo -n "WARNING: Cleaning out everything, proceed? (yes/no) "
read yn
if [ "$yn" != "yes" ]; then
exit 1
fi
if [ -e Makefile ]; then
echo "making maintainer-clean..."
make maintainer-clean 2>&1 > /dev/null
fi
echo "cleaning out Makefile.in's..."
find . -name "Makefile.in" -exec rm {} \;
echo "cleaning out backups..."
find . -name '*~' -exec rm {} \;
echo "cleaning out symlinks..."
find . -type l -exec rm {} \;
echo "cleaning out other..."
rm -rf autom4te.cache
rm -f aclocal.m4 defs.h.in configure config.log config.status
echo -n "Make a tarball? (y/n) "
read yn
if [ "$yn" = "y" ]; then
DIR="`pwd`"
cd ..
rm -f "$AUTO_PROJECT.tar.gz"
tar cvf "$AUTO_PROJECT.tar" "$DIR"
gzip -9 "$AUTO_PROJECT.tar"
cd $DIR
fi