From 56174c9b072cef7e81e5d5c43e17320d3fce92d4 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Mon, 1 Nov 2010 00:08:09 +0100 Subject: [PATCH] Correct the language based typo mistakes. --- utils/typo.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/typo.sh b/utils/typo.sh index 2139abe3..b0e3728f 100755 --- a/utils/typo.sh +++ b/utils/typo.sh @@ -5,16 +5,16 @@ #Description: apply typo rules depending on language for songs (.sg files) #Commentary: to be merge with latex-preprocessing script -for song in songs/*/*.sg; do +for song in $@; do + echo $song if grep -q "selectlanguage{english}" $song then sed -i \ - -e 's/(\s)*?/?/g' \ - -e 's/(\s)*!/!/g' \ - -e 's/(\s)*:/:/g' \ + -e 's/[\s]*?/?/g' \ + -e 's/[\s]*!/!/g' \ + -e 's/[\s]*:/:/g' \ $song; - fi; - if grep -q "selectlanguage{french}" $song + elif grep -q "selectlanguage{french}" $song then sed -i \ -e 's/\([^ ]\)?/\1 ?/g' \