Re: check-po a lynx



On Tue, May 19, 2009 at 03:08:26PM +0200, Pavol Šimo wrote:
> Oprava: -display_charset namiesto -display-charset.
> 
> Pal'o

> --- check-po.orig	2009-05-15 23:06:06.000000000 +0200
> +++ check-po	2009-05-19 15:07:00.000000000 +0200
> @@ -51,6 +51,30 @@
>  		exit 1
>  		;;
>  esac
> +
> +DUMP_COMMAND=
> +DUMP_COMMAND_WIDTH=
> +for agent in lynx elinks ; do
> +	which $agent > /dev/null 2>&1
> +	if test $? -eq 0 ; then
> +		DUMP_COMMAND="$agent -dump"
> +		break
> +	fi
> +done
> +case $DUMP_COMMAND in
> +	elinks*)
> +		DUMP_COMMAND="$DUMP_COMMAND -dump-charset UTF-8"
> +		USER_FULLNAME_IDX=15
> +		USER_EMAIL_IDX=16
> +		DUMP_COMMAND_WIDTH=-dump-width=200
> +		;;
> +	*)
> +		DUMP_COMMAND="$DUMP_COMMAND -display_charset UTF-8"

Do DUMP_COMMAND tu pridavas -display_charset UTF-8, aj ked bolo
prazdne...

> +		USER_FULLNAME_IDX=14
> +		USER_EMAIL_IDX=15
> +		DUMP_COMMAND_WIDTH=-width=200
> +		;;
> +esac
>  	
>  #---------------------------------------------------------
>  
> @@ -107,7 +131,9 @@
>  	echo "Vertimus"
>  	echo "========"
>  
> -	lynx $URL -dump -width=200 > $TMPDIR/vertimus
> +	test -z "$DUMP_COMMAND" && fatal "Cannot get Vertimus page - missing \$DUMP_COMMAND. Please install one of the supported text-mode browsers: lynx, elinks"

... a tu testujes, ci je DUMP_COMMAND prazdne. Jednoducho nebude, lebo
minimalne -display_charset UTF-8 tam urcite bude...


Skus to este trosku vylepsit, prosim.

-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel telka sk  |
|                homepage: http://telka.sk/ |
|                jabber:   marcel jabber sk |
+-------------------------------------------+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]