]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make a script safer
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 23 Aug 2015 12:06:28 +0000 (22:06 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 23 Aug 2015 12:06:28 +0000 (22:06 +1000)
It wiped out my .git

qcsrc/whitespace.sh

index a017dc84f59965e829b8f4c3495caa924839e25d..1e42413a1b7dcdf982b369e9809aacdc60a89453 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
-
-find . -type f -print0 |                                    \
+cd ${0%[\\/]*}
+find . -name .git -prune -o -type f -print0 |                                    \
     xargs -0 sed -i                                         \
         `# strip trailing spaces`                           \
         -e 's/[[:space:]]*$//'                              \