No Description
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.

cleanall.sh 496B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # find all directoies contining "*.aux" AND "clean.sh"
  3. # change to this directories and call "clean.sh"
  4. #
  5. CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )
  6. echo "Dir: $CURRENT_DIR"
  7. find . -iname '*.aux' -printf "$CURRENT_DIR/%h\n" > tmpAllDirs.log
  8. for currdir in `cat tmpAllDirs.log`; do
  9. cd $currdir
  10. if [ -f 'clean.sh' ] ; then
  11. echo "found clean.sh in $currdir"
  12. . ./clean.sh
  13. fi
  14. echo "... done"
  15. done
  16. rm ${CURRENT_DIR}/tmpAllDirs.log