[CONKY] Fix problem in regexp
This commit is contained in:
parent
c9305b52f5
commit
0e4fd49efe
1 changed files with 2 additions and 2 deletions
|
@ -263,11 +263,11 @@ language+=([goyu]="Taiwanese Mandarin");
|
|||
|
||||
if cmus-remote -Q &>/dev/null ; then
|
||||
COMMENT=$( cmus-remote -Q | grep "tag comment " | cut -d " " -f 3- )
|
||||
LANGUAGE=$( echo $COMMENT | sed 's/.*lang:\(.\{2,4\}\).*/\1/')
|
||||
LANGUAGE=$( echo $COMMENT | sed 's/.*lang:\([^,]\{2,4\}\).*/\1/')
|
||||
if [ "$LANGUAGE" = "$COMMENT" ]; then
|
||||
LANGUAGE="";
|
||||
fi
|
||||
COUNTRY=$( echo $COMMENT | sed 's/.*country:\(.\{2\}\).*/\1/')
|
||||
COUNTRY=$( echo $COMMENT | sed 's/.*country:\([^.]\{2\}\).*/\1/')
|
||||
if [ ! -z "$LANGUAGE" ] && [ ! -z "$COUNTRY" ]; then
|
||||
echo "${language[$LANGUAGE]}, ${country[$COUNTRY]}"
|
||||
elif [ ! -z "$LANGUAGE" ]; then
|
||||
|
|
Loading…
Reference in a new issue