almulder Posted July 30, 2020 Share Posted July 30, 2020 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? Quote Link to comment
trurl Posted July 30, 2020 Share Posted July 30, 2020 Take a look at any of the .plg files in /boot/config/plugins. Quote Link to comment
almulder Posted July 30, 2020 Author Share Posted July 30, 2020 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. Quote Link to comment
almulder Posted July 30, 2020 Author Share Posted July 30, 2020 (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 July 30, 2020 by almulder Quote Link to comment
almulder Posted July 31, 2020 Author Share Posted July 31, 2020 Never mind, I am figuring out a different way. Quote Link to comment
bonienl Posted July 31, 2020 Share Posted July 31, 2020 Just do plugin version /boot/config/plugins/user.scripts.plg Quote Link to comment
almulder Posted July 31, 2020 Author Share Posted July 31, 2020 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. Quote Link to comment
trurl Posted July 31, 2020 Share Posted July 31, 2020 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 1 Quote Link to comment
Recommended Posts
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.