potool (0.11-2) scripts/poedit

Summary

 scripts/poedit |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

    
download this patch

Patch contents

--- potool-0.11.orig/scripts/poedit
+++ potool-0.11/scripts/poedit
@@ -55,10 +55,7 @@
 	echo "$POFILE: not writable" >&2
 	exit 1
 fi
-if [ -z "$EDITOR" ]; then
-	echo '$EDITOR is not set1' 1>&2
-	exit 1
-fi
+EDITCMD=sensible-editor
 
 #
 # Get file encoding
@@ -116,11 +113,11 @@
 #
 # Run editor and update the file on success
 #
-$EDITOR "$TMPFILE"
+$EDITCMD "$TMPFILE"
 editor_ret="$?"
 
 if [ $editor_ret -ne 0 ]; then
-	echo "$EDITOR exited abnormally (code $editor_ret), not updating the po file" 1>&2
+	echo "$EDITCMD exited abnormally (code $editor_ret), not updating the po file" 1>&2
 	exit 1
 fi