浏览代码

cleanall ergänzt

pheek 1年前
父节点
当前提交
1ce443e539
共有 1 个文件被更改,包括 22 次插入0 次删除
  1. 22
    0
      cleanall.sh

+ 22
- 0
cleanall.sh 查看文件

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

正在加载...
取消
保存