From 0e0f306e702647e093ac6b2bd783bd72ad304102 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 12 Apr 2023 19:11:41 -0500 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mm-scripts.sh b/mm-scripts.sh index 20c987f..00b8d30 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -739,6 +739,20 @@ UPDATESERVICE(){ echo -e "${idsCL[Red]}No service selected for update${idsCL[Default]}" fi +} + +SHOWSRVCUPDATES(){ + echo -e "${idsCL[LightCyan]}Latest Update URLs Available${idsCL[Default]}" + DIVIDER + + for srvc in "${MM_UPDATE_REPO[@]}"; do + 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://'` + 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://'` + echo -e "${idsCL[LightCyan]}${srvc}${idsCL[Default]}:" + echo -e "${idsCL[LightGreen]}Stable Release : ${idsCL[LightCyan]}${latest_url}${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}Beta Release : ${idsCL[LightCyan]}${beta_url}${idsCL[Default]}" + echo + done } @@ -823,6 +837,10 @@ if [ ! -f ${MMFOLDER}/mm.update.stop ]; then [ "${MM_UPDATE_REPO[${usrvc}]}" != "" ] && UPDATESERVICE ${usrvc} done ;; + + update-list) + SHOWSRVCUPDATES + ;; clear) echo -e "${idsCL[LightCyan]}Clearing all mm.* files ${idsCL[Default]}" echo @@ -836,6 +854,7 @@ if [ ! -f ${MMFOLDER}/mm.update.stop ]; then echo -e " ${idsCL[Yellow]}restart${idsCL[Default]} --> Restart services" echo -e " ${idsCL[Yellow]}update-allservices ${idsCL[Default]} --> Update all services" echo -e " ${idsCL[Yellow]}update-service ${idsCL[Default]} --> Update specified service" + echo -e " ${idsCL[Yellow]}update-list${idsCL[Default]} --> List available releases" echo echo -e " ${idsCL[Yellow]}status${idsCL[Default]} --> Check Status on VPN and Media Services" echo -e " ${idsCL[Yellow]}vpninfo${idsCL[Default]} --> Show VPN Info"