From fe57d1586fc160b1fd519d5d41b47e02530da8b4 Mon Sep 17 00:00:00 2001 From: dmacias72 Date: Sat, 17 Jun 2017 04:34:42 -0600 Subject: [PATCH] move --- {plugins => plugin}/NerdPack.plg | 16 ++++++++++++++-- {plugins => plugin}/NerdPack.png | Bin 2 files changed, 14 insertions(+), 2 deletions(-) rename {plugins => plugin}/NerdPack.plg (92%) rename {plugins => plugin}/NerdPack.png (100%) diff --git a/plugins/NerdPack.plg b/plugin/NerdPack.plg similarity index 92% rename from plugins/NerdPack.plg rename to plugin/NerdPack.plg index 5a347765..0577f589 100755 --- a/plugins/NerdPack.plg +++ b/plugin/NerdPack.plg @@ -6,7 +6,7 @@ - + @@ -212,13 +212,25 @@ else if [ ! -d &plgPATH;/packages/$VER ]; then echo "Creating package directory.." mkdir -p &plgPATH;/packages/$VER - OLD=$(echo "${VER} - 0.1" | bc) + + #check for previous version + OLD=$(echo | awk "{print ${VER} - 0.1}") if [ -d &plgPATH;/packages/${OLD} ]; then count2=`ls -1 /boot/config/plugins/NerdPack/packages/${OLD}/*.txz 2>/dev/null | wc -l` if [ $count2 != 0 ]; then echo "Copying package files..." cp &plgPATH;/packages/${OLD}/* &plgPATH;/packages/${VER}/ fi + else + #check for two versions ago + OLD2=$(echo | awk "{print ${VER} - 0.2}") + if [ -d &plgPATH;/packages/${OLD2} ]; then + count3=`ls -1 /boot/config/plugins/NerdPack/packages/${OLD2}/*.txz 2>/dev/null | wc -l` + if [ $count3 != 0 ]; then + echo "Copying package files..." + cp &plgPATH;/packages/${OLD2}/* &plgPATH;/packages/${VER}/ + fi + fi fi fi diff --git a/plugins/NerdPack.png b/plugin/NerdPack.png similarity index 100% rename from plugins/NerdPack.png rename to plugin/NerdPack.png