mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
551 B

  1. #!/bin/bash
  2. # Subversion has really big ".svn" subdirs. This has much better performance
  3. # than the "find ... ! -path '*/.svn*' ! -path '*/CVS*' ..." used earlier
  4. # in various places.
  5. tmp1=`mktemp` tmp2=`mktemp`
  6. while [ "$#" -gt 0 ]
  7. do
  8. [ -z "${1##[-(\!]*}" ] && break
  9. echo $1 >> $tmp1
  10. shift
  11. done
  12. while ! cmp -s $tmp1 $tmp2
  13. do
  14. cat $tmp1 > $tmp2
  15. find $( cat $tmp2 ) -maxdepth 1 -type d \
  16. ! -name 'CVS' ! -name '.svn' | sort -u > $tmp1
  17. done
  18. find $( cat $tmp2 ) -mindepth 1 -maxdepth 1 \
  19. ! -name 'CVS' ! -name '.svn' "$@"
  20. rm -f $tmp1 $tmp2