update checking config file

This commit is contained in:
dmacias72
2016-03-14 23:48:54 -06:00
parent 9aea6152f6
commit 32d1f68bdf
3 changed files with 43 additions and 20 deletions

View File

@ -3,7 +3,7 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "NerdPack">
<!ENTITY author "dmacias72">
<!ENTITY version "2016.02.23">
<!ENTITY version "2016.03.14">
<!ENTITY launch "Settings/&name;">
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
@ -16,6 +16,9 @@
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;">
<CHANGES>
###2016.03.14
- update plugin for unRAID 6.2 compatibility
- update packages for 6.2
###2016.02.23
- fix: search for a partial match of packages used in other plugins
###2016.02.17
@ -138,10 +141,11 @@ The 'tablesorter' package file.
<!--
The Github repo packages file.
-->
<FILE Name="&plgpath;/packages/packages.json">
<URL>&gitURL;/plugins/packages.json</URL>
</FILE>
-->
<!--
The package description file.
@ -171,7 +175,8 @@ The 'install' script.
<INLINE>
#Verify unRAID Version
source /etc/unraid-version
if [[ ${version:0:3} == 6.0 ]]; then
VER=${version:0:3}
if [[ $VER == 6.0 ]]; then
echo "unRAID version 6.1 or higher is required"
exit 1
fi
@ -180,23 +185,26 @@ fi
sum1=$(/usr/bin/md5sum &plgpath;/&plgname;.txz)
sum2=$(/usr/bin/cat &plgpath;/&plgname;.md5)
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "Wrong 'plugin' package md5 hash."
rm &plgpath;/&plgname;.txz \
&plgpath;/&plgname;.md5
exit 1
echo "Wrong 'plugin' package md5 hash."
rm &plgpath;/&plgname;.txz \
&plgpath;/&plgname;.md5
exit 1
else
upgradepkg --install-new &plgpath;/&plgname;.txz
fi
if [ ! -d &plgpath;/packages/$VER ]; then
mkdir &plgpath;/packages/$VER
fi
if [ ! -d &plgpath;/packages ]; then
mkdir &plgpath;/packages
fi
if [[ ${version:0:3} == 6.1 ]]; then
mv &plgpath;/packages/*txz &plgpath;/packages/6.1
fi
/usr/sbin/packagemanager
upgradepkg --install-new &plgpath;/&plgname;.txz
# Cleaning old source files
find &plgpath;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgpath;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
/usr/sbin/packagemanager
# Cleaning old source files
find &plgpath;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgpath;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
echo ""
echo "-----------------------------------------------------------"
@ -206,6 +214,7 @@ echo " Copyright 2016, &author;, eschultz"
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
fi
</INLINE>
</FILE>