diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-13 09:17:42 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-13 09:17:42 +0000 |
commit | c50f083f8dab0afd651df271307c06523ad1f52e (patch) | |
tree | 360debfa88db4b80c6d66d1bca577cf05e726d0e | |
parent | f884788324181fbad82a34dc8fa8e70269ab144f (diff) |
Fixed language index grep
-rwxr-xr-x | src/webhttrack | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webhttrack b/src/webhttrack index ece22d6..0a932f2 100755 --- a/src/webhttrack +++ b/src/webhttrack @@ -125,8 +125,8 @@ test -d ${DISTPATH}/html || ! log "could not find ${DISTPATH}/html" || exit 1 HTSLANG="${LC_MESSAGES}" ! test -n "${HTSLANG}" && HTSLANG="${LC_ALL}" ! test -n "${HTSLANG}" && HTSLANG="${LANG}" -test -n "${HTSLANG}" && HTSLANG="`echo ${HTSLANG} | cut -c1-2` | tr 'A-Z' 'a-z'" -LANGN=`grep "${HTSLANG}:" ${DISTPATH}/lang.indexes | cut -f2 -d':'` +HTSLANG="`echo $LANG | cut -f1 -d'.' | cut -f1 -d'_'`" +LANGN=`grep -E "^${HTSLANG}:" ${DISTPATH}/lang.indexes | cut -f2 -d':'` ! test -n "${LANGN}" && LANGN=1 # Find the browser |