From 7588f56a77fdaef69188097bddda3a70f7fef2d0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 29 Apr 2023 18:00:44 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- mm-scripts.sh | 46 ++++++++++++++++++++++++---------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/defaults.inc b/defaults.inc index d1cf30f..2ef2b0f 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='3.8.148-04232023' +VERS='3.8.150-04232023' MMFOLDER="/opt/idssys/mediamanager" MMSRV=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) diff --git a/mm-scripts.sh b/mm-scripts.sh index 6d504df..a00fc7b 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -970,33 +970,35 @@ SHOWSRVCUPDATES(){ DIVIDER . lightGreen for usrvc in "${UPDATE_SERVICES[@]}"; do - if [ "${MM_UPDATE_REPO[${usrvc}]}" == "systemd" ]; then + if [ "${usrvc}" != "organizr" ]; then + if [ "${MM_UPDATE_REPO[${usrvc}]}" == "systemd" ]; then - repo_ver=`dpkg -s ${usrvc} | grep Version` - echo -e "${idsCL[LightCyan]}${MM_SERVICES[${usrvc}]}:${idsCL[Default]} Apt Repo Controller" - echo -e "${idsCL[LightGreen]}Repo Release : ${repo_ver}${idsCL[Default]}" - else + repo_ver=`dpkg -s ${usrvc} | grep Version` + echo -e "${idsCL[LightCyan]}${MM_SERVICES[${usrvc}]}:${idsCL[Default]} Apt Repo Controller" + echo -e "${idsCL[LightGreen]}Repo Release : ${repo_ver}${idsCL[Default]}" + else - beta_url=`curl -s https://api.github.com/repos/${MM_UPDATE_REPO[${usrvc}]}/${usrvc}/releases | jq -r '.[0].assets[].browser_download_url' | grep "${MM_UPDATE_REPO_GREP[${usrvc}]}" | cut -d '"' -f 4 | grep -i 'https://'` - # beta_url=`curl -s https://api.github.com/repos/${MM_UPDATE_REPO[${usrvc}]}/${usrvc}/releases | jq -r '.[0].assets[].browser_download_url' | grep "${MM_UPDATE_REPO_GREP[${usrvc}]}" | cut -d '"' -f 4 | grep -i 'https://' | cut -d/ -f8` - beta_ver=`echo ${beta_url} | cut -d/ -f8` + beta_url=`curl -s https://api.github.com/repos/${MM_UPDATE_REPO[${usrvc}]}/${usrvc}/releases | jq -r '.[0].assets[].browser_download_url' | grep "${MM_UPDATE_REPO_GREP[${usrvc}]}" | cut -d '"' -f 4 | grep -i 'https://'` + # beta_url=`curl -s https://api.github.com/repos/${MM_UPDATE_REPO[${usrvc}]}/${usrvc}/releases | jq -r '.[0].assets[].browser_download_url' | grep "${MM_UPDATE_REPO_GREP[${usrvc}]}" | cut -d '"' -f 4 | grep -i 'https://' | cut -d/ -f8` + beta_ver=`echo ${beta_url} | cut -d/ -f8` - latest_url=`curl -s https://api.github.com/repos/${MM_UPDATE_REPO[${usrvc}]}/${usrvc}/releases/latest | jq -r '.assets[].browser_download_url' | grep "${MM_UPDATE_REPO_GREP[${usrvc}]}" | cut -d '"' -f 4 | grep -i 'https://'` - latest_ver=`echo ${latest_url} | cut -d/ -f8` + latest_url=`curl -s https://api.github.com/repos/${MM_UPDATE_REPO[${usrvc}]}/${usrvc}/releases/latest | jq -r '.assets[].browser_download_url' | grep "${MM_UPDATE_REPO_GREP[${usrvc}]}" | cut -d '"' -f 4 | grep -i 'https://'` + latest_ver=`echo ${latest_url} | cut -d/ -f8` - [[ $BETA_SERVICES == *${usrvc}* ]] && cur='Beta' || cur='Stable' - echo -e "${idsCL[LightCyan]}${MM_SERVICES[${usrvc}]}:${idsCL[Default]} ${cur} Selected" - echo -e "${idsCL[LightGreen]}Stable Release : ${latest_ver}${idsCL[Default]}" - echo -e "${idsCL[LightGreen]}Beta Release : ${beta_ver}${idsCL[Default]}" - fi - cver=${usrvc}_VER - echo -e "${idsCL[LightCyan]}Current vers. : ${!cver}${idsCL[Default]}" + [[ $BETA_SERVICES == *${usrvc}* ]] && cur='Beta' || cur='Stable' + echo -e "${idsCL[LightCyan]}${MM_SERVICES[${usrvc}]}:${idsCL[Default]} ${cur} Selected" + echo -e "${idsCL[LightGreen]}Stable Release : ${latest_ver}${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}Beta Release : ${beta_ver}${idsCL[Default]}" + fi + cver=${usrvc}_VER + echo -e "${idsCL[LightCyan]}Current vers. : ${!cver}${idsCL[Default]}" - # echo - # echo ${latest_url} - # echo ${beta_url} - echo - echo + # echo + # echo ${latest_url} + # echo ${beta_url} + echo + echo + fi done }