From: TimePath Date: Sun, 23 Aug 2015 12:06:28 +0000 (+1000) Subject: Make a script safer X-Git-Tag: xonotic-v0.8.2~2047 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=a2e49e78a972fd038e38ca8346d6804fd8284760;p=xonotic%2Fxonotic-data.pk3dir.git Make a script safer It wiped out my .git --- diff --git a/qcsrc/whitespace.sh b/qcsrc/whitespace.sh index a017dc84f..1e42413a1 100755 --- a/qcsrc/whitespace.sh +++ b/qcsrc/whitespace.sh @@ -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:]]*$//' \