Browse Source

cleanall ergänzt

pheek 1 year ago
parent
commit
1ce443e539
1 changed files with 22 additions and 0 deletions
  1. 22
    0
      cleanall.sh

+ 22
- 0
cleanall.sh View File

@@ -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

Loading…
Cancel
Save