-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanup
53 lines (44 loc) · 875 Bytes
/
cleanup
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
#!/bin/sh
#
# Copyright (c) 2003-2014 Matthew Pearson <[email protected]>.
#
# These scripts are free. There is no warranty; your mileage may vary.
# Visit http://creativecommons.org/licenses/by-nc-sa/4.0/ for more details.
#
# $Id$
# print out information about the c compiler and make in $PATH
#
paths=`svn status | grep '^\?' | awk '{print $2}'`
for p in $paths
do
if [ -d "$p" ]
then
echo "won't touch $p: is a directory"
continue
fi
extension=`echo $p | sed -e 's/^.*\(\.[^\.]*\)$/\1/'`
case $extension in
.java|.py|.gz|.mdp|.py-dev|.java-dev|.py-working|.java-working)
def="n"
;;
*)
def="y"
;;
esac
printf "remove $p? [$def] "
read response
case $response in
y|n|Y|N)
doit=`echo $response | tr a-z A-Z`
;;
*)
doit=$def
;;
esac
if [ $doit = "y" ]
then
echo "rm -f $p"
rm -f $p
fi
done
#EOF __TAGGED__