blob: e89b9c098c6382842f426dcc4c7dcb0e89b22d56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
#!/bin/bash
# Analisador de logs do BrWeather
# Criado por LeandroNKZ <leandronkz@gmail.com>
# Se encontrar BUGs, ou erros no programa, favor reportar ao desenvolvedor
# Acesse o site para maiores instruções:
# http://brweatherproject.blogspot.com/
# Distribuído sob licença GPLv3
#Data e hora atual
DATA=`date "+%A %d/%m/%y %H:%M:%S"`
#Cabeçalho
clear
echo "Criando relatório de logs..."
sleep 2
echo "Arquivo de logs do BrWeather-$VERSION
Criado em: $DATA
Em caso de erros persistentes no programa, por favor, leia e envie este arquivo de logs para o e-mail abaixo:
leandronkz@gmail.com
Lembre-se de que ele contém a sua cidade/estado.
Se não quiser expor estar informações, não envie." > ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
#Copiando logs de erros
echo ""
echo "Analisando logs de erros..."
sleep 2
echo "Log de erros" >> ~/brweather.log
cat ~/.brweather/log 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
#Copiando cache INPE
echo ""
echo "Copiando cache..."
sleep 1
echo "Previsão" >> ~/brweather.log
echo "" >> ~/brweather.log
cat ~/.brweather/cache/previsao 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "Cache" >> ~/brweather.log
echo "" >> ~/brweather.log
cat ~/.brweather/cache/cache 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
#Copiando cache Google
echo "PrevisãoOpen1_A" >> ~/brweather.log
echo "" >> ~/brweather.log
cat ~/.brweather/cache/open1_A 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "PrevisãoOpen1" >> ~/brweather.log
echo "" >> ~/brweather.log
cat ~/.brweather/cache/open1 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "PrevisãoOpen2_A" >> ~/brweather.log
echo "" >> ~/brweather.log
cat ~/.brweather/cache/open2_A 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "PrevisãoOpen2_B" >> ~/brweather.log
echo "" >> ~/brweather.log
cat ~/.brweather/cache/open2_B 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "PrevisãoOpen2" >> ~/brweather.log
echo "" >> ~/brweather.log
cat ~/.brweather/cache/open2 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log
echo "" >> ~/brweather.log
echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log
echo "" >> ~/brweather.log
sleep 2
#FIM
echo ""
echo "Criação do log completa!
Leia o arquivo em:
/home/seu_usuário/brweather.log"
echo ""
sleep 2
|