Permalink
Browse files

Ok, fixed up rws using old approach, but spirit of last change.

  • Loading branch information...
julianwa committed Jun 27, 2011
1 parent debd7bd commit cfd806cf196caf394001c94f4552de77fd8f27ce
Showing with 4 additions and 10 deletions.
  1. +4 −10 BashScripts/rws
View
@@ -1,20 +1,14 @@
#!/bin/sh
EXTENSIONS="js html css py cpp h mm m vsh fsh"
+
FIND_PATH=$1
if [ -z $1 ]; then
FIND_PATH="."
fi
-FIND_ARGS="$FIND_PATH -type f"
-
-for ext in js html css py cpp h mm m
+for ext in $EXTENSIONS
do
- if [ $ext != "js" ]; then
- FIND_ARGS="$FIND_ARGS -o"
- fi
- FIND_ARGS="$FIND_ARGS -iname \"*.$ext\""
-done
-
-find $FIND_ARGS -print0 | xargs -0 sed -i "" -E "s/[[:space:]]*$//"
+ find $FIND_PATH -type f -iname *.$ext -print0 | xargs -0 sed -i "" -E "s/[[:space:]]*$//"
+done

0 comments on commit cfd806c

Please sign in to comment.