File: cvsclean

package info (click to toggle)
dynamite 0.1-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 916 kB
  • ctags: 64
  • sloc: sh: 7,824; ansic: 408; makefile: 76
file content (17 lines) | stat: -rwxr-xr-x 301 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

for d in `find . -type d`; do

  if [ `basename "$d"` '!=' 'CVS' ]; then
    if [ -d "$d" ]; then
      pushd "$d"
      FILES='*.o'
      if [ -f ".cvsignore" ]; then
        FILES="$FILES `cat .cvsignore`"
      fi
      for f in $FILES; do rm -rf $f; done
      popd
    fi
  fi
done