Jump to content
Sign in to follow this  
almulder

Plugin Version info location

8 posts in this topic Last Reply

Recommended Posts

Trying to create a user script and need to be able to look up what the current version of some plugins are. Where is this info stored, and how would I read that info?

Share this post


Link to post

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

Share this post


Link to post
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.

Share this post


Link to post
Posted (edited)

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

Share this post


Link to post

Just do

plugin version /boot/config/plugins/user.scripts.plg

 

Share this post


Link to post
9 hours ago, bonienl said:

Just do


plugin version /boot/config/plugins/user.scripts.plg

 

Thanks for the option but it does not work when running it under user scripts. I do have a workaround I am trying.

Share this post


Link to post
2 hours ago, almulder said:

Thanks for the option but it does not work when running it under user scripts. I do have a workaround I am trying.

Maybe try specifying the full path to the plugin command, which you can get with

which plugin

 

Share this post


Link to post

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.

Sign in to follow this