Bläddra i källkod

cleanall ergänzt

pheek 1 år sedan
förälder
incheckning
1ce443e539
1 ändrade filer med 22 tillägg och 0 borttagningar
  1. 22
    0
      cleanall.sh

+ 22
- 0
cleanall.sh Visa fil

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

Laddar…
Avbryt
Spara