---------- Forwarded message ---------- From: Jari Vetoniemi mailroxas@gmail.com Date: 2012/2/24 Subject: Re: [Firmware-dev] osversion (change, usage, ...) To: skeezix skeezix@skeleton.org
2012/2/24 skeezix skeezix@skeleton.org:
On Thu, 23 Feb 2012, Nils Kneuper wrote:
# Hmm, that is a good one, so the version has to be extracted somehow during the # libpnd run and needs to be stored somehow so that it is easily available by # pnd_run.sh... Or is there possibly some very lightweight xml parser we could # use to extract the osversion during the run of pnd_run.sh? Currently you just # rely on the (FDO compatible) .desktop files generated by libpnd, right? We # could add some comment in those files which states the version, though would # have to be done as part of libpnd. I think comments are possible in .desktop # files, so this might be a way to go...
Oh, aside from my other post you've not seen yet --
I've no problem adding to libpnd to include extra attributes in the .desktop; since recent hotfixes I've added quite a few to make minimenu's life easier, as its now using .desktop rather than a full pnd discovery itself (to leverage the work already done by pndnotifyd, since in 99.999% of installs mmenu is running alongside pndnotifyd, though of course the behaviour is configurable.)
jeff
-- If everyone would put barbecue sauce on their food, there would be no war. _______________________________________________ Firmware-dev mailing list Firmware-dev@openpandora.org http://openpandora.org/cgi-bin/mailman/listinfo/firmware-dev
PND="menu/youtube-dl.pnd" VER=$(sed -n 's/.*<osversion(.*)/>.*/\1/p' "$PND") VER=($(echo $VER | sed 's/[^0-9]*/ /g')) echo "${VER[0]}.${VER[1]}.${VER[2]}.${VER[3]}"
This should work for all pnd's, and should be pretty error prone. But anyways. You really should include small CLI application that extracts elements from PND to do this job. (As skeezix mentioned already sed / strings whatever can be slow on big PNDs)
...send mail to skeezix only, I should stay away from this web client...