Advertisement
wagnux

Script Pós Instalação para o Ubuntu 14.04 LTS

Apr 26th, 2014
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ### CRÉDITOS:
  4.  
  5. ### WAGNER ARESTIDES: RESPONSÁVEL PELA CONFIGURAÇÃO E LISTA DE PACOTES PARA INSTALAÇÃO
  6.  
  7. ### VALSON PEREIRA: RESPONSÁVEL PELA A IMPLEMENTAÇÃO DO CÓDIGO
  8.  
  9. ################################# APLICATIVO POS INSTALAÇÃO UBUNTU 14.04 LTS #################################   
  10.  
  11.  
  12. function MenuPrincipal()
  13. {
  14. clear
  15.  
  16. VERSAO=lsb_release\ --short\ --description
  17.  
  18. $VERSAO && echo "*********** Bem Vindo ao Aplicativo Pós instalaçao *************"
  19.  
  20.  
  21. CONDICAO=1
  22.  
  23.     while [ $CONDICAO !=  0 ]
  24.  
  25.             do
  26. echo "
  27. Digite a opcao:
  28.  
  29. 1- baixar e instalar Pacotes Básicos
  30. 2- Pacotes Extras
  31. 3- Sair "
  32.     read OPCAO
  33.        
  34.         case $OPCAO in
  35.             1)instalacaoPacotesBasicos;;
  36.  
  37.                          
  38.             2)menuExtra;;
  39.                          
  40.                         3)echo "Encerrando o Script"
  41.               CONDICAO=0;;
  42.                        
  43.                         *) echo "Opcao Invalida...";;    
  44.                 esac  
  45.            done
  46. }
  47.  
  48. ################################## DEMAIS FUNÇOES ##########################################
  49.  
  50.  
  51. ################################# INSTALAÇÃO BÁSICA #######################
  52.  
  53. function instalacaoPacotesBasicos()
  54. {
  55.  
  56. clear
  57. echo "
  58. Instalando repositórios necessários para obtenção de pacotes...
  59. Para Cancelar a instalação pressione CTRL + C
  60. "
  61.  
  62. add-apt-repository ppa:otto-kesselgulasch/gimp -y && add-apt-repository ppa:webupd8team/java -y && add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily -y && add-apt-repository ppa:samrog131/ppa -y && apt-get update
  63.  
  64.  
  65. echo "
  66. Baixando e instalando Pacotes Básicos...
  67. "
  68.  
  69. apt-get install faac faad ffmpeg-real ffmpeg2theora flac icedax id3v2 lame libflac++6 libjpeg-progs libmpeg3-1 mencoder mjpegtools mp3gain mpeg2dec mpeg3-utils mpegdemux mpg123 mpg321 regionset sox uudeview vorbis-tools x264 arj p7zip p7zip-full p7zip-rar rar unace-nonfree flashplugin-installer ttf-ubuntu-font-family ubuntu-restricted-extras vlc lame preload prelink bum rcconf dialog wine gecko-mediaplayer gimp gimp-plugin-registry gimp-gmic xsane devede k3b libk3b-dev libk3b6-extracodecs ripperx audacity winff ssh portmap nfs-common yakuake hardinfo chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra samba htop kdegames gnome-games supertux frozen-bubble qt4-qtconfig vim language-pack-kde-pt language-pack-pt-base language-pack-pt language-pack-gnome-pt-base language-pack-gnome-pt glipper clementine -y && sudo /usr/share/doc/libdvdread4/install-css.sh && sudo apt-get install unity-tweak-tool oracle-java7-installer zram-config mesa-utils libxss1 -y && cd /tmp && apt-get install debdelta -y && sudo debdelta-upgrade && sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y ; sudo apt-get autoclean ; sudo updatedb && sudo prelink -amR
  70.  
  71.  
  72. }
  73.  
  74. ############################ EXTRAS #####################################################################
  75.  
  76. ##### INSTALACO TLP ###########
  77.  
  78. function instalacoTLP()
  79. {
  80.  
  81. clear
  82. echo "
  83. Instalando o TLP gerenciador de Energia de notebooks....
  84. Para Cancelar a instalação pressione CTRL + C
  85. "
  86.  
  87. add-apt-repository ppa:linrunner/tlp -y && apt-get update && apt-get install tlp tlp-rdw -y ; tlp start
  88.  
  89. echo "
  90. TLP Instalado com sucesso
  91. "
  92.  
  93. }
  94.  
  95. ######## INSTALACAO GOOGLE CHROME ############
  96.  
  97. function instalacaoChrome()
  98. {
  99.  
  100. clear
  101. echo "
  102. Instalando o Google Chrome
  103. Para Cancelar a instalação pressione CTRL + C
  104. "
  105. if [ "$ARCH" = "32" ]; then
  106.      wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb ; sudo dpkg -i google-chrome-stable_current_i386.deb ;
  107.  
  108. else
  109.      wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb ; sudo dpkg -i google-chrome-stable_current_amd64.deb ;
  110. fi
  111.  
  112. echo "
  113. Navegador Google Chrome Instalado com sucesso
  114. "
  115.  
  116. }
  117.  
  118. ########### INSTALACAO PACOTES EDUCACIONAIS ########################
  119.  
  120. function instalacaoPacotesEducacionais()
  121. {
  122.  
  123. clear
  124. echo "
  125. Instalando pacotes Educacionais...
  126. Para Cancelar a instalação pressione CTRL + C
  127. "
  128. apt-get install anagramarama blinken khangman klettres ktouch kturtle kwordquiz childsplay childsplay-alphabet-sounds-pt gcompris gcompris-sound-ptbr glchess gweled kbattleship kblackbox klickety konquest klines kmahjongg kpat pingus lmemory junior-puzzle xgalaga pinta tuxpaint tuxpaint-plugins-default tuxpaint-stamps-default googleearth-package inkscape -y
  129.  
  130. echo "
  131. Pacotes Educacionais Instalados com sucesso...
  132. "
  133. }
  134.  
  135.  
  136. ############### Menu Extra ###############################
  137.  
  138. function menuExtra()
  139. {
  140.  
  141. clear
  142. echo "Escolha qual Pacote instalar:
  143. 1 - TLP Gerenciador de energia (Obs.: SOMENTE PARA NOTEBOOKS, ULTRABOOKS OU NETBOOKS)
  144. 2 - Navegador Google Chrome
  145. 3 - Pacotes Educacionais
  146. 4 - Retornar ao Menu Principal"
  147.  
  148. read OPCAOEXTRA
  149.  
  150.    case $OPCAOEXTRA in
  151.                
  152.     1) instalacoTLP;;
  153.     2) instalacaoChrome;;
  154.     3) instalacaoPacotesEducacionais;;
  155.     4) MenuPrincipal;;
  156.     *) echo "Opcao Invalida...";;  
  157.    esac
  158.  
  159. }
  160.  
  161.  
  162. ################################################## EXECUCAO DO SCRIPT ###########################################
  163.  
  164. if [ $USER = "root" ] ## Verifica se o usuario é root
  165. then
  166. clear
  167. MenuPrincipal
  168.  
  169. else
  170.  
  171. echo "
  172. Voce Precisa ser root para executar esse script
  173. "
  174.  
  175. fi
  176.  
  177. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement