Advertisement
LightProgrammer000

Compilacao [python -> exe]

Mar 14th, 2019
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.29 KB | None | 0 0
  1. # !/bin/bash
  2.  
  3. #################
  4. #### FUNCOES ####
  5. #################
  6.  
  7. # Atualizacao de sistema
  8. Atualizacao_Sistema()
  9. {
  10.     # Titulo
  11.     clear
  12.     echo ""
  13.     echo -e "\033[01;32m ATUALIZANDO... \033[01;37m"
  14.     echo ""
  15.    
  16.     # SubTitulo
  17.     echo -e "\033[01;33m ------------------------------ \033[01;37m"
  18.     echo -e "\033[01;33m --- ATUALIZACAO DO SISTEMA --- \033[01;37m"
  19.     echo -e "\033[01;33m ------------------------------ \033[01;37m"
  20.     echo ""
  21.    
  22.     # Atualizacao
  23.     apt update
  24.     apt-get update
  25.     apt-get upgrade
  26.     apt-get dist-upgrade
  27.    
  28.     # Limpeza
  29.     apt-get clean
  30.     apt-get remove
  31.     apt-get autoclean
  32.     apt-get autoremove
  33. }
  34. # Atualizacao de sistema paralela
  35. Atualizacao_Ferramentas()
  36. {
  37.     # Titulo
  38.     clear
  39.     echo ""
  40.     echo -e "\033[01;32m ATUALIZANDO... \033[01;37m"
  41.     echo ""
  42.    
  43.     # SubTitulo
  44.     echo -e "\033[01;33m ----------------------------- \033[01;37m"
  45.     echo -e "\033[01;33m --- ATUALIZACAO SUPORTE ----- \033[01;37m"
  46.     echo -e "\033[01;33m ----------------------------- \033[01;37m"
  47.     echo ""
  48.    
  49.     # Conexao
  50.     apt-get -f install ssh
  51.     apt-get -f install ftp
  52.    
  53.     # Grafico
  54.     apt-get -f install dialog
  55.     apt-get -f install whiptail
  56.    
  57.     # Ferramentas de Rede
  58.     apt-get -f install dnsutils
  59.     apt-get -f install net-tools
  60.    
  61.     # Editores
  62.     apt-get -f install vim
  63.     apt-get -f install nano
  64.    
  65.     # Compiladores essenciais
  66.     apt-get -f install build-essential $(uname -r)
  67.     apt-get -f install build-essential linux-headers- $(uname -r)
  68.    
  69.     # Diversos
  70.     apt-get -f install bc
  71.     apt-get -f install git
  72.     apt-get -f install csh
  73.     apt-get -f install zip
  74.     apt-get -f install yum
  75.     apt-get -f install gpm
  76.     apt-get -f install gem
  77.     apt-get -f install sudo
  78.     apt-get -f install idle
  79.     apt-get -f install whois
  80.     apt-get -f install rsync
  81.     apt-get -f install ipcalc
  82.     apt-get -f install ntfs-3g
  83.     apt-get -f install bundler
  84.     apt-get -f install python3
  85.     apt-get -f install ntfs-3g
  86.     apt-get -f install python-pip
  87.     apt-get -f install python-virtualenv
  88.     apt-get -f install debian-archive-keyring
  89.     apt-get -f install pip install pyinstaller
  90. }
  91.  
  92. Compilar()
  93. {
  94.     # Apresentacao
  95.     clear
  96.     echo ""
  97.     echo -e "\033[01;33m ------------------ \033[01;37m"
  98.     echo -e "\033[01;34m --- COMPILACAO --- \033[01;37m"
  99.     echo -e "\033[01;33m ------------------ \033[01;37m"
  100.     echo ""
  101.    
  102.     # Entrada de dados
  103.     echo -e -n "\033[01;35m - Digite o nome do programa [sem extensao .py]: \033[01;37m"
  104.     read nome
  105.  
  106.     # Comando
  107.     pyinstaller $nome.py
  108. }
  109.  
  110. ###################
  111. ##### PROGRAMA ####
  112. ###################
  113.  
  114. while (( 1 ))
  115. do
  116.     # Apresentacao
  117.     clear
  118.     echo ""
  119.     echo -e "\033[01;37m ------------- \033[01;37m"
  120.     echo -e "\033[01;36m --- MENU  --- \033[01;37m"
  121.     echo -e "\033[01;37m ------------- \033[01;37m"
  122.     echo ""
  123.     echo -e "\033[01;33m ------------------------------- \033[01;37m"
  124.     echo -e "\033[01;34m [1] Atualizacao do sistema      \033[01;37m"
  125.     echo -e "\033[01;35m [2] Atualizacao das ferramentas \033[01;37m"
  126.     echo -e "\033[01;36m [3] Compilacao              \033[01;37m"
  127.     echo -e "\033[01;33m ------------------------------- \033[01;37m"
  128.     echo ""
  129.     echo -e -n "\033[01;37m - Resp: \033[01;37m"
  130.     read opc
  131.     echo ""
  132.  
  133.     # Estrutura em escolha
  134.     case $opc in
  135.     1)
  136.         Atualizacao_Sistema;;
  137.    
  138.     2)
  139.         Atualizacao_Ferramentas;;
  140.    
  141.     3)
  142.         Compilar;;
  143.    
  144.     *)
  145.         ;;
  146.     esac
  147.    
  148.     echo ""
  149.     echo -e "\033[01;35m =-=-= [Press Enter] =-=-= \033[01;37m"
  150.     read
  151. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement