SHARE
TWEET

update

milux1 Nov 12th, 2019 (edited) 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. function UPDATE {
  4. if [[ ! -d ~/.milux ]];then
  5.     mkdir ~/.milux
  6. fi
  7. if [[ ! -f ~/.milux/vcv ]];then
  8.     echo "v-2.0" > ~/.milux/vcv
  9. fi
  10.  
  11. echo -e "$G"
  12. logo
  13. echo -e "$G Buscando la version mas nueva.."
  14. sleep 2
  15. echo -e "Espera por favor"
  16. curl https://pastebin.com/raw/2r8bPRHv > /dev/null 2>&1 > tmpv
  17. mv tmpv  ~/.milux/
  18. CV=$(cat ~/.milux/vcv)
  19. NV=$(cat ~/.milux/tmpv)
  20. if [ "$CV" = "$NV" ];then
  21.     clear
  22.     rm ~/.milux/tmpv
  23.     logo
  24.     echo -e "$Y Tu script esta Actualizado! tu version es:$RE $CV"
  25.     sleep 2
  26. else
  27.     CV=$(cat ~/.milux/vcv)
  28.     echo -e $Y"==============================="
  29.      echo -e $Y"=                             ="
  30.      echo -e $Y"=  Nueva Actualizacion! v-2.3 ="
  31.      echo -e $Y"=                             ="
  32.      echo -e $Y"=$G  Version actual: $CV $Y     ="
  33.      echo -e $Y"=                             ="
  34.      echo -e $Y"==============================="
  35.      echo -e "$Y Quieres actualizar?$RE"
  36.      read -p "
  37.      y/n >> " SN
  38.      if [ "$SN" = "y" ];then
  39.          rm ~/.milux/vcv
  40.          echo "$NV" > ~/.milux/vcv
  41.          curl https://pastebin.com/raw/RSJYYKrX > /dev/null 2>&1 > TMP
  42.          chmod 777 TMP
  43.          bash TMP;rm TMP
  44.          echo -e $G"Instalado Correctamente!"
  45.          sleep 2
  46.      elif [ "$SN" = "n" ];then
  47.          rm ~/.milux/tmpv
  48.  
  49.      fi
  50. fi
  51. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top