package maker para o slackware
Publicado por underguiz 23/01/2004
[ Hits: 5.545 ]
Cria pacotes para slackware a partir do source (.tar.gz). O
script ira compilar o fonte, criar o pacote (.tgz) e se
requisitado instala-lo.
#!/bin/bash # Copyright 2004 Guilherme Fran?a Vieira, Uberl?ndia, Minas Gerais Brazil # All rights reserved. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if [ `id -u` = 0 ] ; then if [ "$1" != "" ] ; then if [ "$2" != "" ] ; then case "$1" in *tar.gz) cmd="tar xfz" ;; *tar.bz2) cmd="tar xfj" ;; *tar) cmd="tar xf" ;; *) echo ""$1": Unknow file type" echo "Suported are: tar.gz, tar.bz2, tar" ;; esac if [ -a "$1" ] ; then workdir=`pwd` echo "Creating temporary directory..." mkdir /tmp/"$1".src echo "Extracting files..." $cmd "$1" -C /tmp/"$1".src cd /tmp/"$1".src cd `ls` mkdir "$2" if [ -a configure ] ; then echo "Compiling the sources..." ./configure --prefix=`pwd`/"$2" 1> /dev/null make 1> /dev/null make install 1> /dev/null cd "$2" echo "Creating package..." makepkg -c y "$2" 1> /dev/null cp "$2" "$workdir" cd "$workdir" echo "Removing Temporary files..." rm -rf /tmp/"$1".src echo "Install the package now? [yes|no]" ; read answer case $answer in yes) installpkg $2 ;; no) ;; *) echo "what a hell is $aswer?" ;; esac else cd "$workdir" rm -rf /tmp/"$1".src echo ""$1": not a source file, exiting" fi else echo ""$1": file not found, exiting" fi else echo "Package name missing" echo "Usage: "$0" [source file] [package name]" fi else echo "Source file missing" echo "Usage: "$0" [source file] [package name]" fi else echo "You must be root to run this program" fi
Compartilhando a tela do Computador no Celular via Deskreen
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Configuração para desligamento automatizado de Computadores em um Ambiente Comercial
Efeito "livro" em arquivos PDF
Como resolver o erro no CUPS: Unable to get list of printer drivers
Flatpak: remover runtimes não usados e pacotes
Mudar o gerenciador de login (GDM para SDDM e vice-versa) - parte 2
Wifi não funciona no Aspire ES 15 com o Debian (8)
Como atualizar o Debian 8 para o 10 (10)
Dica sobre iptables ACCEPT e DROP (6)
NGNIX - Aplicar SNAT para evitar roteamento assimetrico (29)
[Python] Automação de scan de vulnerabilidades
[Python] Script para analise de superficie de ataque
[Shell Script] Novo script para redimensionar, rotacionar, converter e espelhar arquivos de imagem
[Shell Script] Iniciador de DOOM (DSDA-DOOM, Doom Retro ou Woof!)
[Shell Script] Script para adicionar bordas às imagens de uma pasta