[Gnucash-changes] r14047 - mail-search/nmz - Update the sed script to be a little safer

Derek Atkins warlord at cvs.gnucash.org
Sun May 14 15:30:30 EDT 2006


Author: warlord
Date: 2006-05-14 15:30:29 -0400 (Sun, 14 May 2006)
New Revision: 14047
Trac: http://svn.gnucash.org/trac/changeset/14047

Modified:
   mail-search/nmz/namazu-cgi.sh
Log:
Update the sed script to be a little safer


Modified: mail-search/nmz/namazu-cgi.sh
===================================================================
--- mail-search/nmz/namazu-cgi.sh	2006-05-14 19:19:58 UTC (rev 14046)
+++ mail-search/nmz/namazu-cgi.sh	2006-05-14 19:30:29 UTC (rev 14047)
@@ -4,7 +4,7 @@
 #
 
 # compute the langinfo from the PATH_INFO
-langinfo=`echo $PATH_INFO | sed -e 's#^/\([^/]*\)/*$#\1#'`
+langinfo=`echo $PATH_INFO | grep '^/[a-zA-Z][a-zA-Z]' | sed -e 's#^/\([a-zA-Z][a-zA-Z]\).*$#\1#'`
 
 if [ -n "$langinfo" ] ; then
   LANG="$langinfo"



More information about the gnucash-changes mailing list