<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>renesp.com.br</title>
	<atom:link href="http://renesp.com.br/feed" rel="self" type="application/rss+xml" />
	<link>http://renesp.com.br</link>
	<description>escovando bits</description>
	<pubDate>Wed, 04 Aug 2010 03:35:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Temas de cores para o VIM</title>
		<link>http://renesp.com.br/archives/249</link>
		<comments>http://renesp.com.br/archives/249#comments</comments>
		<pubDate>Wed, 29 Apr 2009 15:27:33 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=249</guid>
		<description><![CDATA[Para quem é fã do VIM (como eu), existe um site com centenas de esquemas de cores. A navegação entra os temas é muito boa, assim como a visualização. Vale a pena conferir:
http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/
]]></description>
			<content:encoded><![CDATA[<p>Para quem é fã do VIM (como eu), existe um site com centenas de esquemas de cores. A navegação entra os temas é muito boa, assim como a visualização. Vale a pena conferir:</p>
<p><a href="http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/" target="_blank">http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/249/feed</wfw:commentRss>
		</item>
		<item>
		<title>Twitter</title>
		<link>http://renesp.com.br/archives/236</link>
		<comments>http://renesp.com.br/archives/236#comments</comments>
		<pubDate>Fri, 17 Apr 2009 03:30:58 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=236</guid>
		<description><![CDATA[E eu nem sabia q eu tinha Twiter&#8230;. a muito tempo eu me inscrevi e acabei esquecendo por completo, porém agora eu decidi fazer meu perfil lá, quem quiser me seguir:
http://twitter.com/renesp
Ainda está em carater experimental, não sei se vou mante-lo atualizado, anyway&#8230;.
t+!
]]></description>
			<content:encoded><![CDATA[<p>E eu nem sabia q eu tinha Twiter&#8230;. a muito tempo eu me inscrevi e acabei esquecendo por completo, porém agora eu decidi fazer meu perfil lá, quem quiser me seguir:</p>
<p>http://twitter.com/renesp</p>
<p>Ainda está em carater experimental, não sei se vou mante-lo atualizado, anyway&#8230;.</p>
<p>t+!</p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/236/feed</wfw:commentRss>
		</item>
		<item>
		<title>Atualização do site =:)</title>
		<link>http://renesp.com.br/archives/230</link>
		<comments>http://renesp.com.br/archives/230#comments</comments>
		<pubDate>Tue, 31 Mar 2009 07:41:43 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=230</guid>
		<description><![CDATA[Caros leitores!
Apesar de séculos sem postar, eu estou vivo e trabalhando muito no meu TCC. Na verdade esse post é só pra dizer que finalmente eu organizei meus materiais (apresentações, mini-cursos, etc) e os disponibilizei em uma nova sessão: Materiais  
Críticas e sugestões são bem vindas quanto ao conteúdo, reparem que alguns materiais são [...]]]></description>
			<content:encoded><![CDATA[<p>Caros leitores!</p>
<p>Apesar de séculos sem postar, eu estou vivo e trabalhando muito no meu TCC. Na verdade esse post é só pra dizer que finalmente eu organizei meus materiais (apresentações, mini-cursos, etc) e os disponibilizei em uma nova sessão: Materiais <img src='http://renesp.com.br/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Críticas e sugestões são bem vindas quanto ao conteúdo, reparem que alguns materiais são de 2006, nestes três anos aprendi muita coisa então não me crucifiquem se houver erros ou coisas do gênero&#8230;.</p>
<p>t+! Abraços;</p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/230/feed</wfw:commentRss>
		</item>
		<item>
		<title>MoboTV - Nova versão</title>
		<link>http://renesp.com.br/archives/198</link>
		<comments>http://renesp.com.br/archives/198#comments</comments>
		<pubDate>Wed, 04 Feb 2009 02:11:47 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=198</guid>
		<description><![CDATA[Caros leitores,
Um post bem rápido para não manter o BLOG muito parado: Hoje subi uma nova versão do MoboTV no svn:
http://code.google.com/p/mobotv/source/browse/
Fiz mudanças internas consideráveis, o programa está bem mais estável e o comportamento estranho da interface (travamentos, etc) foi resolvido. Em breve empacoto essa versão e disponibilizo para download. Quem quiser se antecipar pode baixar [...]]]></description>
			<content:encoded><![CDATA[<p>Caros leitores,</p>
<p>Um post bem rápido para não manter o BLOG muito parado: Hoje subi uma nova versão do MoboTV no svn:</p>
<p><a href="http://code.google.com/p/mobotv/source/browse/" target="_blank">http://code.google.com/p/mobotv/source/browse/</a></p>
<p>Fiz mudanças internas consideráveis, o programa está bem mais estável e o comportamento estranho da interface (travamentos, etc) foi resolvido. Em breve empacoto essa versão e disponibilizo para download. Quem quiser se antecipar pode baixar via svn.</p>
<p>t+!</p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/198/feed</wfw:commentRss>
		</item>
		<item>
		<title>Novo servidor de DNS do site</title>
		<link>http://renesp.com.br/archives/189</link>
		<comments>http://renesp.com.br/archives/189#comments</comments>
		<pubDate>Sun, 18 Jan 2009 00:57:23 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=189</guid>
		<description><![CDATA[Caro leitor,
Desde o início meu site enfrentou problemas com o servidor de DNS, por isso decidi migrar para outro servidor de DNS, gratuito e até agora, muito bom. Não posso deixar de divulgar:

Parabéns ao pessoal do EveryDNS pela iniciativa.
t+!
]]></description>
			<content:encoded><![CDATA[<p>Caro leitor,</p>
<p>Desde o início meu site enfrentou problemas com o servidor de DNS, por isso decidi migrar para outro servidor de DNS, gratuito e até agora, muito bom. Não posso deixar de divulgar:</p>
<p><a href="http://www.everydns.com/"><img alt="" src="http://www.everydns.com/images/main.gif" title="http://www.everydns.com" class="alignnone" width="450" height="101" /></a></p>
<p>Parabéns ao pessoal do EveryDNS pela iniciativa.</p>
<p>t+!</p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/189/feed</wfw:commentRss>
		</item>
		<item>
		<title>MoboTV beta released!</title>
		<link>http://renesp.com.br/archives/186</link>
		<comments>http://renesp.com.br/archives/186#comments</comments>
		<pubDate>Sun, 18 Jan 2009 00:51:18 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=186</guid>
		<description><![CDATA[Caro leitor,
Ta ai! Beta version released
http://code.google.com/p/mobotv/downloads/list
E já que o Didi decidiu comentar meu post, disponibilizei uma versão (de testes) para PC no repositório. Assim que tiver um tempo eu empacoto essa versão também. A versão para MID já possui todos os pacotes (Ubuntu - Hardy, lpia).
t+!
]]></description>
			<content:encoded><![CDATA[<p>Caro leitor,</p>
<p>Ta ai! Beta version released</p>
<p><a href="http://code.google.com/p/mobotv/downloads/list">http://code.google.com/p/mobotv/downloads/list</a></p>
<p>E já que o Didi decidiu comentar meu post, disponibilizei uma versão (de testes) para PC no repositório. Assim que tiver um tempo eu empacoto essa versão também. A versão para MID já possui todos os pacotes (Ubuntu - Hardy, lpia).</p>
<p>t+!</p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/186/feed</wfw:commentRss>
		</item>
		<item>
		<title>MoboTV - the child is comming&#8230;..</title>
		<link>http://renesp.com.br/archives/180</link>
		<comments>http://renesp.com.br/archives/180#comments</comments>
		<pubDate>Fri, 16 Jan 2009 04:01:31 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=180</guid>
		<description><![CDATA[Caros leitores&#8230;.
UFA! Após muito suor durante 8 dias (24h / dia), embebido em documentações (GTK, GLib, GStreamer), finalmente está saindo o beta do MoboTV, meu projeto para o concurso da Intel. O site do projeto é http://code.google.com/p/mobotv.  Por enquanto testei ele só no meu MID, mas funcionou legal. Já dá pra assistir streams de [...]]]></description>
			<content:encoded><![CDATA[<p>Caros leitores&#8230;.</p>
<p>UFA! Após muito suor durante 8 dias (24h / dia), embebido em documentações (GTK, GLib, GStreamer), finalmente está saindo o beta do MoboTV, meu projeto para o concurso da Intel. O site do projeto é <a href="http://code.google.com/p/mobotv">http://code.google.com/p/mobotv</a>.  Por enquanto testei ele só no meu MID, mas funcionou legal. Já dá pra assistir streams de vídeo pela internet. A interface está toda pronta e funcional, mas ainda é um beta, preciso fazer vários ajustes no GStreamer.</p>
<p>Assim que tiver um tempo vou disponibilizar uma versão para desktops (sem hildon). Quem quiser, não deixe de conferir. Sugestões são bem vindas.</p>
<p>t+!</p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/180/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tunelamento via SSH</title>
		<link>http://renesp.com.br/archives/171</link>
		<comments>http://renesp.com.br/archives/171#comments</comments>
		<pubDate>Fri, 09 Jan 2009 22:02:19 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[diversos]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=171</guid>
		<description><![CDATA[ Este artigo aborda o tunelamento via SSH, uma pr&#225;tica muito comum quando se deseja critografar uma conex&#227;o ou at&#233; mesmo para &#8220;burlar&#8221; servidores proxy que restringem o acesso a Web.]]></description>
			<content:encoded><![CDATA[<div align='justify'>
<p><small><a href="http://renesp.com.br/pdf/sshtunel.pdf"><img src="http://renesp.com.br/pdf/pdf.png" alt="Pdf icon">Baixar vers&atilde;o em PDF</a></small></p>
<p><br/></p>
<blockquote><p><b><center>Resumo</center></b><br />
 Este artigo aborda o tunelamento via SSH, uma pr&aacute;tica muito comum quando se deseja critografar uma conex&atilde;o ou at&eacute; mesmo para &ldquo;burlar&rdquo; servidores <i>proxy</i> que restringem o acesso a Web.<br />&nbsp;&nbsp;&nbsp;&nbsp;
</p></blockquote>
<ol>
<h1>
<li>Introdu&ccedil;&atilde;o</h1>
<p>
O tunelamento &eacute; uma pr&aacute;tica muito comum e consiste basicamente em redirecionar requisi&ccedil;&otilde;es de rede para uma determinada conex&atilde;o. Por exemplo, em uma rede dotada de um servidor <i>proxy</i> todas as requisi&ccedil;&otilde;es HTTP de uma m&aacute;quina passar&atilde;o antes pelo servidor <i>proxy</i>, que poder&aacute; ou n&atilde;o barrar as mesmas. Atrav&eacute;s do tunelamento, podemos por exemplo, redirecionar as requisi&ccedil;&otilde;es HTTP de uma m&aacute;quina n&atilde;o mais para o <i>proxy</i> da rede, mas para uma conex&atilde;o SSH com uma m&aacute;quina externa (por exemplo), ficando assim livre do <i>proxy</i>.<br />&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>Uma vez que a conex&atilde;o SSH &eacute; criptografada, o tunelamento tamb&eacute;m pode ser utilizado para tornarmos nossa conex&atilde;o mais segura. Por exemplo, voc&ecirc; est&aacute; acessando uma rede wireless p&uacute;blica e precisa entrar no site do seu banco para pagar uma conta, neste caso o tunelamento poder&aacute; ser utilizado para criptografar os dados.<br />&nbsp;&nbsp;&nbsp;&nbsp;</p>
</li>
<h1>
<li>Requisitos e m&eacute;todos</h1>
<p>
Para fazer um tunelamento via SSH &eacute; necess&aacute;rio uma m&aacute;quina que possa ser acessada via SSH, ou seja, que esteja rodando o servidor em uma porta liberada na rede. Vamos utilizar como exemplo o seguinte ambiente:</p>
<ul>
<li> Voc&ecirc; est&aacute; na rede A, que possui um servidor <i>proxy</i> que barra conteudo da Web.</li>
<li> Voc&ecirc; possui uma m&aacute;quina na sua casa (rede B), com IP 200.190.20.4 rodando um servidor ssh na porta 4004</li>
<li> Voc&ecirc; deseja tunelar suas requsi&ccedil;&otilde;es da rede A para a conex&atilde;o da sua casa, ficando livre do <i>proxy</i></li>
</ul>
<p></p>
<p>O primeiro passo para fazer o tunelamento &eacute; iniciar uma conex&atilde;o com a m&aacute;quina da rede B:</p>
<div style='overflow:auto; border:gray solid 1px; border-style:dashed;border-width:thin;background-color:#000000'><span style='color:#FFFFFF;'></p>
<pre>
$ ssh -p 4004 -D localhost:8080 200.190.20.4
</pre>
<p></span></div>
<p></p>
<p>Ap&oacute;s logado, todo o tr&aacute;fego na porta 8080 da m&aacute;quina da rede A ser&aacute; redirecionado para a m&aacute;quina da rede B. </p>
<p>O segundo passo &eacute; configurarmos o firefox para utilizar nossa conex&atilde;o: </p>
<p>Basta acessarmos o menu Edit-&gt;Preferences, selecionarmos as abas Advanced e depois Network. Devemo configurar o endere&ccedil;o de <i>proxy</i> como mostra a figura abaixo:</p>
<div>
 <center><br />
<a href="http://renesp.com.br/wp-content/uploads/2009/01/firefox_sshtunel.png" rel="thumbnail"><img src="http://renesp.com.br/wp-content/uploads/2009/01/firefox_sshtunel.png" alt="" title="Firefox ssh" width="413" height="495" class="alignnone size-full wp-image-176" /></a><br />
 <small>Configura&ccedil;&atilde;o do Firefox</small><br />
 </center>
</div>
<p></p>
<p>Pronto, agora &eacute; s&oacute; navegar com seguran&ccedil;a!</p>
</li>
<h1>
<li>Conclus&atilde;o</h1>
<p>
Este artigo abordou superficialmente o tunelamento SSH, mostrando uma das diversas utilidades que o mesmo pode ter.<br />&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p><center><a rel="license" target="_blank" href="http://creativecommons.org/licenses/by-nc/2.5/br/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/2.5/br/88x31.png"/></a><br/><small><i>&ldquo;Tunelamento via SSH&rdquo;, por <a href="mailto:rene@renesp.com.br">Ren&ecirc; de Souza Pinto</a>, &eacute; licensiado sob a <a target="_blank" rel="license" href="http://creativecommons.org/licenses/by-nc/2.5/br/">Creative Commons Atribui&ccedil;&atilde;o-Uso N&atilde;o-Comercial 2.5 Brasil License</a>.</i></small></center>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/171/feed</wfw:commentRss>
		</item>
		<item>
		<title>Férias :)</title>
		<link>http://renesp.com.br/archives/162</link>
		<comments>http://renesp.com.br/archives/162#comments</comments>
		<pubDate>Fri, 09 Jan 2009 20:54:48 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=162</guid>
		<description><![CDATA[Caros leitores&#8230;
Finalmente, férias! Sei que o BLOG está &#8220;paradaço&#8221; mas estou programando sem parar estes dias, fazendo meu projeto para o concurso da Intel (Moblin). Além de é claro, não parar de mexer no meu novo brinquedinho, igual esse ai da foto:

Bem, por enquanto vou fazer um post de tunelamento via ssh (super batido, eu [...]]]></description>
			<content:encoded><![CDATA[<p>Caros leitores&#8230;</p>
<p>Finalmente, férias! Sei que o BLOG está &#8220;paradaço&#8221; mas estou programando sem parar estes dias, fazendo meu projeto para o concurso da Intel (Moblin). Além de é claro, não parar de mexer no meu novo brinquedinho, igual esse ai da foto:</p>
<p><img alt="" src="http://i84.photobucket.com/albums/k17/pauliu/aigo_mid/20080801/DSC_8505.jpg" title="Aigo P8860" class="alignnone" width="660" height="445" /></p>
<p>Bem, por enquanto vou fazer um post de tunelamento via ssh (super batido, eu sei), mas sempre acaba sendo útil para alguém&#8230;. principalmente quando se está sob aquele proxy chato do trabalho, ou da facul&#8230; <img src='http://renesp.com.br/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>t+!</p>
]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/162/feed</wfw:commentRss>
		</item>
		<item>
		<title>Automatizando (ainda mais) a instalação de pacotes via apt-get</title>
		<link>http://renesp.com.br/archives/152</link>
		<comments>http://renesp.com.br/archives/152#comments</comments>
		<pubDate>Tue, 02 Dec 2008 12:17:29 +0000</pubDate>
		<dc:creator>rene</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://renesp.com.br/?p=152</guid>
		<description><![CDATA[Um script que automatiza (ainda mais) a instalação de pacotes em sistemas baseado no apt-get.]]></description>
			<content:encoded><![CDATA[<p>
Instalar pacotes via o famoso apt-get realmente é uma facilidade imensa. Porém, as vezes instalamos uma distro no nosso HD novo, ou no computador do vizinho, e nos colocamos a lembrar quais os pacotes devemos instalar. Como todo programador preguiçoso, procurei uma maneira de automatizar esta tarefa e um jeito simples que encontrei foi fazer um script que lê um arquivo que contém nomes de pacotes, instalando no sistema somente os pacotes que ainda não estão instalados, ou também os reinstalando, caso seja desejado.<br />
<br />
A utilização é muito simples, por exemplo:
</p>
<p>
Arquivo packs.txt</p>

<div class="wp_syntax"><div class="code"><pre class="text text" style="font-family:monospace;">xfce4-panel-dbg
xfce4-panel-dev
xfce4-places-plugin
xfce4-radio-plugin
xfce4-screenshooter-plugin
xfce4-sensors-plugin</pre></div></div>

<pre>
<div style='overflow:auto; border:gray solid 1px; border-style:dashed;border-width:thin;background-color:#000000'><span style='color:#FFFFFF;'>
$ sudo ./install_pkg.sh packs.txt

</span></div>
</pre>
<p>
</p>
<p>O script: </p>
<p><small><a href="http://renesp.com.br/shell/install_pkg.sh"><img src="http://renesp.com.br/shell/shellscript.png" alt="Shell icon">Baixar script</a></small></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
</pre></td><td class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># install_pkg - Easy way to install packages on debian systems</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Author: Renê de Souza Pinto</span>
<span style="color: #666666; font-style: italic;"># Date:   January / 2008</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This program is free software; you can redistribute it and/or</span>
<span style="color: #666666; font-style: italic;"># modify it under the terms of the GNU General Public License</span>
<span style="color: #666666; font-style: italic;"># as published by the Free Software Foundation; either version 2</span>
<span style="color: #666666; font-style: italic;"># of the License, or (at your option) any later version.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This program is distributed in the hope that it will be useful,</span>
<span style="color: #666666; font-style: italic;"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span style="color: #666666; font-style: italic;"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<span style="color: #666666; font-style: italic;"># GNU General Public License for more details.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># You should have received a copy of the GNU General Public License</span>
<span style="color: #666666; font-style: italic;"># along with this program; if not, write to the Free Software</span>
<span style="color: #666666; font-style: italic;"># Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
<span style="color: #007800;">APTPAR</span>=<span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #007800;">PFILE</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
<span style="color: #007800;">INSTALL</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
<span style="color: #007800;">REINSTALL</span>=<span style="color: #ff0000;">&quot;&quot;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$#&quot;</span> <span style="color: #660033;">-lt</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;install_pkg - Easy way to install packages on debian systems&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Use:&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;      $0 [-r] &lt;package_file&gt;&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;      &lt;package_file&gt;   = Where &lt;package_file&gt; is a file with the packages that will be installed (listed by name).&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;                         Packages already installed will NOT be re-installed.&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;      -r               = Install all packages from &lt;package_file&gt; (even for already installed packages)&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> 0;
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> = <span style="color: #ff0000;">&quot;-r&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #007800;">APTPAR</span>=<span style="color: #ff0000;">&quot;--reinstall&quot;</span>;
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;$2&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Please, provide a package file: $0 -r &lt;package_file&gt;&quot;</span>
			<span style="color: #7a0874; font-weight: bold;">echo</span>
			<span style="color: #7a0874; font-weight: bold;">exit</span> 0;
		<span style="color: #000000; font-weight: bold;">else</span>
			<span style="color: #007800;">PFILE</span>=$<span style="color: #000000;">2</span>;
		<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #000000; font-weight: bold;">else</span>
		<span style="color: #007800;">PFILE</span>=$<span style="color: #000000;">1</span>;
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Check packages file</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">&quot;$PFILE&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> 
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Cannot access $PFILE&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> 0;
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Proccessing packages</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Proccessing package file...&quot;</span>
&nbsp;
<span style="color: #007800;">packs</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mktemp</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$packs</span>
<span style="color: #000000; font-weight: bold;">for</span> pkg <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$PFILE</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$(cat $packs | grep $pkg 2&gt; /dev/null | tail -1 | cut -d' ' -f1)&quot;</span> = <span style="color: #ff0000;">&quot;ii&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;$APTPAR&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #007800;">REINSTALL</span>=<span style="color: #ff0000;">&quot;$REINSTALL $pkg&quot;</span>
		<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #000000; font-weight: bold;">else</span>
		<span style="color: #007800;">INSTALL</span>=<span style="color: #ff0000;">&quot;$INSTALL $pkg&quot;</span>;
	<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$packs</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;[ <span style="color: #000099; font-weight: bold;">\0</span>33[32mDONE<span style="color: #000099; font-weight: bold;">\0</span>33[0m ]&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Execute apt commands</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;$REINSTALL&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">--reinstall</span> <span style="color: #007800;">$REINSTALL</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;$INSTALL&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #007800;">$INSTALL</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://renesp.com.br/archives/152/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
