source: branches/1.2/doc-expressolivre/expressoInstall.sh @ 685

Revision 685, 4.8 KB checked in by niltonneto, 15 years ago (diff)

Resolve #425

  • Property svn:executable set to *
  • Property svn:mime-type set to application/octet-stream
Line 
1#!/bin/bash
2/* foreground colors */
3#define AFC_BLACK           30
4#define AFC_RED             31
5#define AFC_GREEN           32
6#define AFC_YELLOW                      33
7#define AFC_BLUE            34
8#define AFC_MAGENTA         35
9#define AFC_CYAN            36
10#define AFC_WHITE           37
11
12/* ansi background colors */
13#define ABC_BLACK           40
14#define ABC_RED             41
15#define ABC_GREEN           42
16#define ABC_YELLOW          43
17#define ABC_BLUE            44
18#define ABC_MAGENTA         45
19#define ABC_CYAN            46
20#define ABC_WHITE           47
21
22Principal()
23{
24   clear;
25   cecho 1 44 "***************************************************************************";
26   cecho 1 44 "|Projeto Expresso Livre                                                   |";
27   cecho 1 44 "| http://www.expressolivre.org                                            |";
28   cecho 1 44 "| Script Genérico para instalação do ambiente Expresso Livre.             |";
29   cecho 1 44 "| Versão 1.0 - Data 11/09/2007                                            |";
30   cecho 1 44 "| IMPORTANTE: LEIA O ARQUIVO README ANTES DE INSTALAR!!!                  |";
31   cecho 1 44 "| Cada script de cada distribuição possui seu mantenedor.                 |";
32   cecho 1 44 "| Você pode encontrar os créditos em cada instalador.                     |";   
33   cecho 1 44 "***************************************************************************";
34   echo   
35   cecho 33 1 "Escolha a sua distribuição Linux:"
36   echo
37   cecho 1 1 "1. Debian Sarge"
38   cecho 1 1 "2. Debian Etch (UTF-8)"
39   cecho 1 1 "3. Debian Etch (ISO-8859-1)"
40   cecho 1 1 "4. Debian Lenny (UTF-8)"
41   cecho 1 1 "5. SuSe 10.0"
42   cecho 1 1 "6. SuSe 10.1"
43   cecho 1 1 "7. CentOS 5"
44   cecho 1 1 "8. Red Hat Enterprise 5"   
45   cecho 1 1 "9. Sair do Script"
46   echo
47   cecho 32 1 "Digite sua opção e pressione ENTER: " -n; read opcao;
48   case $opcao in
49     1) InstalarDebian_sarge;;
50     2) InstalarDebian_etch ;;
51     3) InstalarDebian_etch_iso ;;
52     4) InstalarDebian_lenny ;;
53     5) InstalarSuse_100 ;;
54     6) InstalarSuse_101 ;;
55     7) InstalarCentos_5 ;;
56     8) InstalarRH_E5 ;;
57     9) Fim;;
58     *) cecho 31 1 "Erro: Opção inválida" ; sleep 1; clear; Principal;
59   esac
60}
61
62#       Função para imprimir colorido
63#       $1 -> Número da cor do texto
64#       $2 -> Número da cor de fundo
65#       $3 -> Texto
66#       $4 -> Imprimir na mesma linha, use -n
67cecho(){
68        echo $4 -e "\e[$1;$2m $3";tput sgr0;
69}
70
71returnMain()
72{
73    cd ..;
74    cecho 31 1 "Pressione ENTER para voltar ao menu principal" -n;
75    read a;
76    clear;
77    Principal
78}
79# Funções que invocam os respectivos scripts
80InstalarDebian_sarge()
81{
82        echo "Invocando o script para o Debian Sarge ...";
83    cd debian;./expressoInstallDebian-sarge.sh;
84        returnMain;
85}
86InstalarDebian_etch()
87{
88    echo "Invocando o script para o Debian Etch ...";
89    cd debian;./expressoInstallDebian-etch.sh;
90        returnMain;
91}
92InstalarDebian_etch_iso()
93{
94    echo "Invocando o script para o Debian Etch (ISO-8859-1) ...";
95    cd debian;./expressoInstallDebian-etch-ISO8859-1.sh;
96        returnMain;
97}
98InstalarDebian_lenny()
99{
100    echo "Invocando o script para o Debian Etch ...";
101    cd debian;./expressoInstallDebian-lenny.sh;
102        returnMain;
103}
104InstalarSuse_100()
105{
106    echo "Invocando o script para o Suse 10.0 ...";
107    cd suse;./expressoInstallSuse10.0.sh;
108        returnMain;
109}
110InstalarSuse_101()
111{
112    echo "Invocando o script para o Suse 10.1 ...";
113    cd suse;./expressoInstallSuse10.1.sh;
114        returnMain;
115}
116InstalarCentos_5()
117{
118    echo "Invocando o script para o CentoOS ...";
119    cd rhel5-centos5;./expressoInstallCentos5.sh;
120        returnMain;
121}
122InstalarRH_E5()
123{
124    echo "Invocando o script para o Red Hat Enterprise 5 ...";
125    cd rhel5-centos5;./expressoInstallRHEL5.sh;
126        returnMain;
127}
128
129Fim()
130{
131# clear;
132# cecho 1 43 "***************************************************************************";
133# cecho 1 43 "| Projeto Expresso Livre                                                  |";
134# cecho 1 43 "| http://www.expressolivre.org                                            |";
135# cecho 1 43 "| Script Genérico que invoca os demais scripts.                           |";
136# cecho 1 43 "| Cada distribuição possui seu script individual.                         |";
137# cecho 1 43 "| Os scripts são contribuições recebidas da comunidade ExpressoLivre.     |";
138# cecho 1 43 "| ------------------------------------------------------------------------|";
139# cecho 1 43 "| This program is free software; you can redistribute it and/or modify it |";
140# cecho 1 43 "| under the terms of the GNU General Public License as published by the   |";
141# cecho 1 43 "| Free Software Foundation; either version 2 of the License, or (at your  |";
142# cecho 1 43 "| option)  any later version.                                             |";
143# cecho 1 43 "***************************************************************************";
144 exit 0;
145}
146
147Principal
Note: See TracBrowser for help on using the repository browser.