暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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