LarsKongo
April 3rd, 2011, 09:25 AM
Is there any way I can grab some data from a xml file in a bash script and then check if that data (which is a version number) is less than (version number?)
The file is i'm talking about is /usr/share/gtk-engines/murrine.xml
It starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<engine schema_version="0.1" module_name="murrine" long_name="Murrine">
<metainfo>
<version>0.98.1.1</version>
What I want to extract is 0.98.1.1 and then check if the version number (let say 98 ) is lower than 98, and if it is it will echo a message to the user to install the latest murrine engine. Or if 0 is more than 0 then the echo message will be ignored. :) Also, if it can't find /usr/share/gtk-engines/murrine.xml it will display a message to the user to install the murrine engine.
I've been googling forever for something that can check which version of a specific GTK engine someone have installed. Bonus if it works cross-distribution. :P
The file is i'm talking about is /usr/share/gtk-engines/murrine.xml
It starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<engine schema_version="0.1" module_name="murrine" long_name="Murrine">
<metainfo>
<version>0.98.1.1</version>
What I want to extract is 0.98.1.1 and then check if the version number (let say 98 ) is lower than 98, and if it is it will echo a message to the user to install the latest murrine engine. Or if 0 is more than 0 then the echo message will be ignored. :) Also, if it can't find /usr/share/gtk-engines/murrine.xml it will display a message to the user to install the murrine engine.
I've been googling forever for something that can check which version of a specific GTK engine someone have installed. Bonus if it works cross-distribution. :P