diff --git a/mm-scripts.sh b/mm-scripts.sh index 36cd1de..f987db7 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -855,7 +855,7 @@ UPDATESERVICE(){ [ ! -d /opt/Backups ] && mkdir /opt/Backups echo -e "${idsCL[Green]}Done${idsCL[Default]}" - + if [ "${MM_UPDATE_REPO[${usrvc}]}" != "" ] && [ "${MM_UPDATE_REPO[${usrvc}]}" != "systemd" ]; then msg="Finding latest update url" @@ -874,7 +874,14 @@ UPDATESERVICE(){ fi installed_ver=`echo ${latest_release_url} | cut -d/ -f8` echo -e "${idsCL[Green]}Done${idsCL[Default]}" + + msg="Latest Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${installed_ver}${idsCL[Default]}" + cver=${usrvc}_VER + msg="Current Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${!cver}${idsCL[Default]}" + if [ "${!cver}" != "${installed_ver}" ]; then msg="Installing version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${installed_ver}${idsCL[Default]}" @@ -952,12 +959,12 @@ UPDATESERVICE(){ echo -e "${idsCL[Green]}${usrvc^} Service has been updated${idsCL[Default]}" else - msg="Latest Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${installed_ver}${idsCL[Default]}" - - cver=${usrvc}_VER - msg="Current Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${!cver}${idsCL[Default]}" + # msg="Latest Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + # echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${installed_ver}${idsCL[Default]}" + # + # cver=${usrvc}_VER + # msg="Current Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + # echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${!cver}${idsCL[Default]}" echo -e " ${idsCL[White]}Update Not Needed${idsCL[Green]}${installed_ver}${idsCL[Default]}" fi