Plugin Version info location


Recommended Posts

13 minutes ago, trurl said:

Take a look at any of the .plg files in /boot/config/plugins.

Maybe you can help me out with one of them to get me started.

 

I want to get the version number from user.scripts plugin and then store that info in another file (we will call it old_userscripts_ver.txt).

 

 

So my script would first check if the old_userscripts_ver.txt exists (Which I know how to do)

Then if it does not exist, I need to create it with the version info from user.scripts plugin

If it does exist I need to compare the versions from the original file vs my file, if they are the same then echo "Same" if different then echo "Different"

 

Thanks for the help.

Link to comment

Fist part of the file:

<?xml version="1.0" standalone="yes"?>
<!DOCTYPE PLUGIN [
<!ENTITY name "TestFile">
<!ENTITY author "Andrew Zawadzki">
<!ENTITY version "2020.05.30">
<!ENTITY md5 "d079ca6e025086978db8b2f7174ac448">
<!ENTITY launch "Settings/Userscripts">
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
<!ENTITY github "Squidly271/user.scripts">
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/master/plugins/&name;.plg">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.3.3" icon="file-text-o" support="http://lime-technology.com/forum/index.php?topic=49992.0">
  <CHANGES>
###2020.05.30
- Fix Name / Description containing HTML when editing

###2020.05.11
- Fix display aberration caused by debugging info

 

 

I have tried 

grep '<!ENTITY version' /boot/config/plugins/user.scripts.plg

 

but get no result

 

when I try 

grep '2020.05.30' /boot/config/plugins/user.scripts.plg

 

it grabs the first comment line instead.

###2020.05.30

 

I belive the issue is <! part. how can I search for that?

Edited by almulder
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.