Last active
August 15, 2019 03:27
-
-
Save reagent/e1f8b4ccaaa659b4ae76 to your computer and use it in GitHub Desktop.
Revisions
-
reagent revised this gist
Aug 20, 2014 . 1 changed file with 15 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,18 +4,22 @@ set -e # fail on nonzero status cd $1 files=`find . \ -not \( -path ./vendor -prune \) \ -not \( -path ./tmp -prune \) \ -name '*.html' -o -name '*.js' -o -name '*.coffee' -o \ -name '*.sass' -o -name '*.scss' -o -name '*.erb' \ -type f` # Handle whitespace in filenames # http://en.wikipedia.org/wiki/Internal_field_separator IFS=$'\n' for file in $files; do echo -n "Converting '$file' ... " expand -t2 "$file" > out.tmp mv out.tmp "$file" echo 'done.' done -
reagent created this gist
Aug 20, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/bin/bash set -e # fail on nonzero status cd $1 files=`find . -path ./vendor -prune -type f \ -name '*.html' -o -name '*.js' -o -name '*.coffee' -o \ -name '*.sass' -o -name '*.scss' -o -name '*.erb'` for file in $files; do echo -n "Converting '$file' ... " expand -t2 $file > out.tmp mv out.tmp $file echo 'done.' done git add . git commit -m "Convert whitespace"