From: <bug...@xi...> - 2008-02-09 14:01:39
|
http://bugs.xine-project.org/show_bug.cgi?id=41 --- Comment #1 from Ville Skyttä <vil...@ik...> 2008-02-09 14:01:42 UTC --- Created an attachment (id=15) --> (http://bugs.xine-project.org/attachment.cgi?id=15) Make xine-config --version parsing more robust I think there's quite a bit more room for improvement in the sed expression: 1) The expression is not bound to start/end of line, and will thus pass possible leading/trailing garbage through. 2) It uses plain "." (== any character as far as sed is concerned) where it appears to search for the literal ".". 3) The whole "xine-config --version" output is assigned to all xine_config_*_version vars if there's no match. I think more intuitive would be them to be empty if parsing fails. 4) It uses * (0 or more) for matching digit sequences, where I think + (1 or more) would be desirable. The attached patch (tested in shell only on Fedora 8's sed 4.1.5-9.fc8) should fix issues 1 to 3. I suppose for 4) it would additionally take only replacing the first three "*" with "\+" but IIRC there are some portability issues related to "+" between different sed versions. -- Configure bugmail: http://bugs.xine-project.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. You are watching all bug changes. |