update variables

This commit is contained in:
dmacias72 2016-10-10 17:06:04 -06:00
parent 26c50fb0fa
commit ef055bff8f

View File

@ -8,8 +8,8 @@
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master"> <!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg"> <!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
<!ENTITY pkgURL "&gitURL;/source/packages"> <!ENTITY pkgURL "&gitURL;/source/packages">
<!ENTITY plgpath "/boot/config/plugins/&name;"> <!ENTITY plgPATH "/boot/config/plugins/&name;">
<!ENTITY plgname "&name;-&version;-x86_64-1"> <!ENTITY plgNAME "&name;-&version;-x86_64-1">
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;"> <!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
]> ]>
@ -149,7 +149,7 @@ The 'tablesorter' package file.
<MD5>ead9fb4c4a317e7d6426b3521f0e0c0b</MD5> <MD5>ead9fb4c4a317e7d6426b3521f0e0c0b</MD5>
</FILE> </FILE>
<FILE Name="&plgpath;/&name;.cfg"> <FILE Name="&plgPATH;/&name;.cfg">
<INLINE> <INLINE>
<![CDATA[ <![CDATA[
@ -160,15 +160,15 @@ The 'tablesorter' package file.
<!-- <!--
The 'plugin' package file. The 'plugin' package file.
--> -->
<FILE Name="&plgpath;/&plgname;.txz"> <FILE Name="&plgPATH;/&plgNAME;.txz">
<URL>&gitURL;/archive/&plgname;.txz</URL> <URL>&gitURL;/archive/&plgNAME;.txz</URL>
</FILE> </FILE>
<!-- <!--
The 'plugin' package MD5 hash. The 'plugin' package MD5 hash.
--> -->
<FILE Name="&plgpath;/&plgname;.md5"> <FILE Name="&plgPATH;/&plgNAME;.md5">
<URL>&gitURL;/archive/&plgname;.md5</URL> <URL>&gitURL;/archive/&plgNAME;.md5</URL>
</FILE> </FILE>
<!-- <!--
@ -185,47 +185,47 @@ if [[ $VER == 6.0 ]]; then
fi fi
# Verify and install plugin package # Verify and install plugin package
sum1=$(/usr/bin/md5sum &plgpath;/&plgname;.txz) sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
sum2=$(/usr/bin/cat &plgpath;/&plgname;.md5) sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "Wrong 'plugin' package md5 hash." echo "Wrong 'plugin' package md5 hash."
rm &plgpath;/&plgname;.txz \ rm &plgPATH;/&plgNAME;.txz \
&plgpath;/&plgname;.md5 &plgPATH;/&plgNAME;.md5
exit 1 exit 1
else else
count=`ls -1 /boot/config/plugins/NerdPack/packages/*.txz 2>/dev/null | wc -l` count=`ls -1 /boot/config/plugins/NerdPack/packages/*.txz 2>/dev/null | wc -l`
if [ $count != 0 ]; then if [ $count != 0 ]; then
if [ ! -d &plgpath;/packages/6.1 ]; then if [ ! -d &plgPATH;/packages/6.1 ]; then
mkdir -p &plgpath;/packages/6.1 mkdir -p &plgPATH;/packages/6.1
fi fi
echo "Moving package files..." echo "Moving package files..."
mv &plgpath;/packages/*txz &plgpath;/packages/6.1 mv &plgPATH;/packages/*txz &plgPATH;/packages/6.1
fi fi
if [[ $VER == 6.3 ]]; then if [[ $VER == 6.3 ]]; then
if [ ! -d &plgpath;/packages/$VER ]; then if [ ! -d &plgPATH;/packages/$VER ]; then
mkdir -p &plgpath;/packages/$VER mkdir -p &plgPATH;/packages/$VER
if [ -d &plgpath;/packages/6.2 ]; then if [ -d &plgPATH;/packages/6.2 ]; then
count2=`ls -1 /boot/config/plugins/NerdPack/packages/6.2/*.txz 2>/dev/null | wc -l` count2=`ls -1 /boot/config/plugins/NerdPack/packages/6.2/*.txz 2>/dev/null | wc -l`
if [ $count2 != 0 ]; then if [ $count2 != 0 ]; then
echo "Copying package files..." echo "Copying package files..."
cp &plgpath;/packages/6.2/* &plgpath;/packages/$VER/ cp &plgPATH;/packages/6.2/* &plgPATH;/packages/$VER/
fi fi
fi fi
fi fi
fi fi
if [ ! -d &plgpath;/packages/$VER ]; then if [ ! -d &plgPATH;/packages/$VER ]; then
mkdir -p &plgpath;/packages/$VER mkdir -p &plgPATH;/packages/$VER
fi fi
upgradepkg --install-new &plgpath;/&plgname;.txz upgradepkg --install-new &plgPATH;/&plgNAME;.txz
/usr/sbin/packagemanager /usr/sbin/packagemanager
# Cleaning old source files # Cleaning old source files
find &plgpath;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete find &plgPATH;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgpath;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete find &plgPATH;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
echo "" echo ""
echo "-----------------------------------------------------------" echo "-----------------------------------------------------------"
@ -244,10 +244,10 @@ The 'remove' script.
--> -->
<FILE Run="/bin/bash" Method="remove"> <FILE Run="/bin/bash" Method="remove">
<INLINE> <INLINE>
removepkg &plgpath;/&plgname;.txz removepkg &plgPATH;/&plgNAME;.txz
rm -rf &emhttp; rm -rf &emhttp;
rm -f &plgpath;/&plgname;.txz rm -f &plgPATH;/&plgNAME;.txz
rm -f &plgpath;/&plgname;.md5 rm -f &plgPATH;/&plgNAME;.md5
echo "" echo ""
echo "-----------------------------------------------------------" echo "-----------------------------------------------------------"