Advertisement
wagnux

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

Apr 26th, 2014
347
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. ### EMAIL: wagner2308@gmail.com
  7.  
  8. ### VALSON PEREIRA: RESPONSÁVEL PELA A IMPLEMENTAÇÃO DO CÓDIGO
  9. ### EMAIL: valson.pereira@gmail.com
  10.  
  11. ################################# APLICATIVO POS INSTALAÇÃO UBUNTU 14.04 LTS #################################   
  12.  
  13.  
  14. function MenuPrincipal()
  15. {
  16. clear
  17.  
  18. VERSAO=lsb_release\ --short\ --description
  19.  
  20. $VERSAO && echo "*********** Bem Vindo ao Aplicativo Pós instalaçao *************"
  21.  
  22.  
  23. CONDICAO=1
  24.  
  25.     while [ $CONDICAO !=  0 ]
  26.  
  27.             do
  28. echo "
  29. Digite a opcao:
  30.  
  31. 1- baixar e instalar Pacotes Básicos
  32. 2- Pacotes Extras
  33. 3- Sair "
  34.     read OPCAO
  35.        
  36.         case $OPCAO in
  37.             1)instalacaoPacotesBasicos;;
  38.  
  39.                          
  40.             2)menuExtra;;
  41.                          
  42.                         3)echo "Encerrando o Script"
  43.               CONDICAO=0;;
  44.                        
  45.                         *) echo "Opcao Invalida...";;    
  46.                 esac  
  47.            done
  48. }
  49.  
  50. ################################## DEMAIS FUNÇOES ##########################################
  51.  
  52.  
  53. ################################# INSTALAÇÃO BÁSICA #######################
  54.  
  55. function instalacaoPacotesBasicos()
  56. {
  57.  
  58. clear
  59. echo "
  60. Instalando repositórios necessários para obtenção de pacotes...
  61. Para Cancelar a instalação pressione CTRL + C
  62. "
  63.  
  64. 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
  65.  
  66.  
  67. echo "
  68. Baixando e instalando Pacotes Básicos...
  69. "
  70.  
  71. 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
  72.  
  73.  
  74. }
  75.  
  76. ############################ EXTRAS #####################################################################
  77.  
  78. ##### INSTALACO TLP ###########
  79.  
  80. function instalacoTLP()
  81. {
  82.  
  83. clear
  84. echo "
  85. Instalando o TLP gerenciador de Energia de notebooks....
  86. Para Cancelar a instalação pressione CTRL + C
  87. "
  88.  
  89. add-apt-repository ppa:linrunner/tlp -y && apt-get update && apt-get install tlp tlp-rdw -y ; tlp start
  90.  
  91. echo "
  92. TLP Instalado com sucesso
  93. "
  94.  
  95. }
  96.  
  97. ######## INSTALACAO GOOGLE CHROME ############
  98.  
  99. function instalacaoChrome()
  100. {
  101.  
  102. clear
  103. echo "
  104. Instalando o Google Chrome
  105. Para Cancelar a instalação pressione CTRL + C
  106. "
  107. if [ "$ARCH" = "32" ]; then
  108.      wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb ; sudo dpkg -i google-chrome-stable_current_i386.deb ;
  109.  
  110. else
  111.      wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb ; sudo dpkg -i google-chrome-stable_current_amd64.deb ;
  112. fi
  113.  
  114. echo "
  115. Navegador Google Chrome Instalado com sucesso
  116. "
  117.  
  118. }
  119.  
  120. ########### INSTALACAO PACOTES EDUCACIONAIS ########################
  121.  
  122. function instalacaoPacotesEducacionais()
  123. {
  124.  
  125. clear
  126. echo "
  127. Instalando pacotes Educacionais...
  128. Para Cancelar a instalação pressione CTRL + C
  129. "
  130. 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
  131.  
  132. echo "
  133. Pacotes Educacionais Instalados com sucesso...
  134. "
  135. }
  136.  
  137.  
  138. ############### Menu Extra ###############################
  139.  
  140. function menuExtra()
  141. {
  142.  
  143. clear
  144. echo "Escolha qual Pacote instalar:
  145. 1 - TLP Gerenciador de energia (Obs.: SOMENTE PARA NOTEBOOKS, ULTRABOOKS OU NETBOOKS)
  146. 2 - Navegador Google Chrome
  147. 3 - Pacotes Educacionais
  148. 4 - Retornar ao Menu Principal"
  149.  
  150. read OPCAOEXTRA
  151.  
  152.    case $OPCAOEXTRA in
  153.                
  154.     1) instalacoTLP;;
  155.     2) instalacaoChrome;;
  156.     3) instalacaoPacotesEducacionais;;
  157.     4) MenuPrincipal;;
  158.     *) echo "Opcao Invalida...";;  
  159.    esac
  160.  
  161. }
  162.  
  163.  
  164. ################################################## EXECUCAO DO SCRIPT ###########################################
  165.  
  166. if [ $USER = "root" ] ## Verifica se o usuario é root
  167. then
  168. clear
  169. MenuPrincipal
  170.  
  171. else
  172.  
  173. echo "
  174. Voce Precisa ser root para executar esse script
  175. "
  176.  
  177. fi
  178.  
  179. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement