Quellcode durchsuchen

cleanall ergänzt

pheek vor 1 Jahr
Ursprung
Commit
1ce443e539
1 geänderte Dateien mit 22 neuen und 0 gelöschten Zeilen
  1. 22
    0
      cleanall.sh

+ 22
- 0
cleanall.sh Datei anzeigen

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

Laden…
Abbrechen
Speichern