File: make-cvsclean.sh

package info (click to toggle)
rosegarden 2.1-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,652 kB
  • ctags: 4,273
  • sloc: ansic: 42,081; makefile: 4,042; sh: 1,711; tcl: 320
file content (22 lines) | stat: -rwxr-xr-x 716 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# Don't run this.  This script is used to tidy up a Rosegarden source
# directory tree that's been checked out with cvs export; not all of
# the files are necessarily needed, so this just compares against an
# existing source tree and removes any extra files.  This is a stupid
# and dangerous script; don't use it unless you know exactly what
# you're doing, because without the right comparator tree in the right
# place, it has an effect more or less equivalent to "rm -r ."

for x in `find . -type d -print` ; do
  for y in $x/* ; do
    if [ ! -f $HOME/rosegarden/$y -a ! -d $HOME/rosegarden/$y ]
    then echo $y
      if [ -d $y ]
      then rmdir $y
      else rm $y
      fi
    fi
  done
done