[SCM] live-manual branch, debian-next, updated. debian/3.0_a11-1-12-gdc9460a

Daniel Baumann daniel at debian.org
Tue Apr 3 18:43:06 UTC 2012


The following commit has been merged in the debian-next branch:
commit dc9460a010d19fb95043772f4b31c6c7ac09a0b1
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Apr 3 20:42:26 2012 +0200

    Correcting some shell errors in find-fuzzy.sh.

diff --git a/manual/bin/find-fuzzy.sh b/manual/bin/find-fuzzy.sh
index b459e29..d1988a9 100755
--- a/manual/bin/find-fuzzy.sh
+++ b/manual/bin/find-fuzzy.sh
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 # Script to assist translators in finding and fixing fuzzy strings in live-manual.
 
 echo ""
@@ -9,105 +11,95 @@ echo "Type: de, es, fr, it, pt_BR or ro ['a' to see all]['q' to quit]"
 
 # Editor defaults to vim unless otherwise specified in preferences.
 
-EDITOR=${EDITOR:-vim}
+EDITOR="${EDITOR:-vim}"
 
 # Creating the function. Searches 'fuzzy' and offers to open editor to fix them.
 
-find_fuzzy()
-
+find_fuzzy ()
 {
-	echo ""	
-	echo "There are $(grep -w 'fuzzy' manual/po/$ANSWER/* | wc -l) fuzzy strings in your language." 
-	echo ""	
+	echo ""
+	echo "There are $(grep -w 'fuzzy' manual/po/$ANSWER/* | wc -l) fuzzy strings in your language."
+	echo ""
 
 	grep -w 'fuzzy' manual/po/$ANSWER/*
 
-	if [ "$(grep -w 'fuzzy' manual/po/$ANSWER/* | wc -l)" = "0" ]
-	then 	
-		echo "You may now proceed...please do:"
+	if [ "$(grep -w 'fuzzy' manual/po/$ANSWER/* | wc -l)" -eq "0" ]
+	then
+		echo "You may now proceed... please do:"
 		echo ""
 		echo "  * git add ."
 		echo "  * git commit -a -m \"Your commit message.\""
 		echo "  * git push "
 		echo ""
+
 		exit 0
 	else
 		echo ""
 		echo "Do you want to launch your text editor to start fixing them? [yes/no]"
 
-			read OPENEDITOR
-			case "$OPENEDITOR" in
+		read OPENEDITOR
 
-				y*|Y*)	$EDITOR $(grep -w 'fuzzy' manual/po/$ANSWER/* | uniq | sed 's|:#, fuzzy.*||')
+		case "$OPENEDITOR" in
+			y*|Y*)
+				$EDITOR $(grep -w 'fuzzy' manual/po/$ANSWER/* | uniq | sed 's|:#, fuzzy.*||')
 				;;
 
-				n*|N*)	exit 0
+			n*|N*)
+				exit 0
 				;;
 
-				*)	echo "You didn't type 'yes'. Exiting..."
-					exit 0
-
-			esac
-
+			*)	echo "You didn't type 'yes'. Exiting..."
+				exit 0
+				;;
+		esac
 	fi
+
 	exit 0
 }
 
 # Languages menu.
 
-read ANSWER  
-case "$ANSWER" in
+read ANSWER
 
-	de)	find_fuzzy
-		;;
-
-	en)	echo "Nothing to be done, really."
+case "$ANSWER" in
+	en)
+		echo "Nothing to be done, really."
 		echo "Translation English-English not implemented yet!"
 		;;
 
-	es)	find_fuzzy
+	de|es|fr|it|pt_BR|ro)
+		find_fuzzy
 		;;
 
-	fr)	find_fuzzy
-		;;
-
-	it)	find_fuzzy
-		;;
-
-	pt_BR)	find_fuzzy
-		;;
-
-	ro)	find_fuzzy
-		;;
-
-	a)	grep -w 'fuzzy' manual/po/*/*
+	a)
+		grep -w 'fuzzy' manual/po/*/*
 
 		echo ""
 		echo "Do you want to launch your text editor to start fixing them? [yes/no]"
 
-			read OPENEDITOR
-			case "$OPENEDITOR" in
+		read OPENEDITOR
 
-				y*|Y*)	$EDITOR $(grep -w 'fuzzy' manual/po/*/* | uniq | sed 's|:#, fuzzy.*||')
+		case "$OPENEDITOR" in
+			y*|Y*)
+				$EDITOR $(grep -w 'fuzzy' manual/po/*/* | uniq | sed 's|:#, fuzzy.*||')
 				;;
 
-				n*|N*)	exit 0
+			n*|N*)
+				exit 0
 				;;
 
-				*)	echo "You didn't type 'yes'. Exiting..."
-					exit 0
-
-			esac
-
+			*)
+				echo "You didn't type 'yes'. Exiting..."
+				exit 0
+				;;
+		esac
 		;;
 
-	q)	exit
+	q)
+		exit 0
 		;;
 
-	*)	echo "No language chosen. Exiting..."
-
+	*)
+		echo "No language chosen. Exiting..."
+		;;
 esac
-
-
-
-

-- 
live-manual



More information about the debian-live-changes mailing list