Dexter versăo 2.0 - Instalador de pacotes para Sabayon
Publicado por hp (última atualizaçăo em 03/08/2018)
[ Hits: 2.277 ]
Homepage: https://byhackerperito.blogspot.com
Instalador de pacotes para Sabayon Linux em sua versão 2.0 com melhorias, como dupla linguagem (inglês e português) e sistema de log.
AVISO: ao executar a primeira vez, vai ocorrer um erro na linha 227, mas acontecerá apenas uma vez!
#!/bin/bash ################################################ # autor: hacker perito # # blog: https://byhackerperito.blogspot.com # # email: byh4ck3rp3r1t0@gmail.com # # data: 30/07/2018 # ################################################ if [ "$USER" != "root" ]; then printf "Você não tem permissão root!\n"; printf "you not have root permission!\n"; else # verifica linguagem fl="/root/.dexter/lang.db" if [ -e "$fl" ]; then function br(){ # pt-br version printf "||=============================================================||\n" printf "||=== Dexter v2.0 by: Hacker Perito ===||\n" printf "||=============================================================||\n" printf "||#############################################################||\n" printf "||### Visite-nos: https://byhackerperito.blogspot.com ###||\n" printf "||#############################################################||\n" printf "||=============================================================||\n" printf "[1]=> Pesquisar pacote\n" printf "[2]=> Instalar pacote\n" printf "[0]=> Sair\n" printf "{Opção}<=: " read opc case $opc in "0") clear exit ;; "1") printf "{Pacote}<=: " read n equo update equo s $n printf "Deseja uma pesquisa mais profunda?\n" printf "s/N\n" read p if [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "Ok\n" elif [ "$p" == "s" ] || [ "$p" == "S" ]; then emerge --searchdesc $n else printf "???\n" fi ;; "2") printf "[1]=> pacote online\n[2]=> pacote local\n[0]=> Sair\n{Opção}<=: " read op if [ "$op" == "0" ]; then clear exit elif [ "$op" == "1" ]; then printf "{Pacote}<=: " read pc date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pc >> /root/.dexter/dexter_log.txt nano /root/.dexter/dexter_log.txt printf "Você pode visualizar o log em: /root/.dexter\n"; elif [ "$op" == "2" ]; then printf "Deseja listar algum diretório?\n" printf "s/N\n" read q if [ "$q" == "n" ] || [ "$q" == "N" ]; then printf "Ok\n" elif [ "$q" == "s" ] || [ "$q" == "S" ]; then printf "{Dir}<=: " read d ls $d else printf "???\n" fi printf "Deseja baixar algum pacote?\n" printf "s/N\n" read p if [ "$p" == "s" ] || [ "$p" == "S" ]; then printf "{Link}<=: " read l wget $l pack=$(ls *.tbz2) mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> /root/.dexter/dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "Você pode visualizar o log em: /root/.dexter"; exit elif [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "{Pacote}<=: " read pack mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "Você pode visualizar o log em: /root/.dexter"; exit else printf "???\n" fi else printf "???\n" fi ;; *) printf "???\n" ;; esac } # fim function en(){ # en-us version printf "||=============================================================||\n" printf "||=== Dexter v2.0 by: Hacker Perito ===||\n" printf "||=============================================================||\n" printf "||#############################################################||\n" printf "||#### visit us: https://byhackerperito.blogspot.com ####||\n" printf "||#############################################################||\n" printf "||=============================================================||\n" printf "[1]=> Search package\n" printf "[2]=> Install package\n" printf "[0]=> Exit\n" printf "{Option}<=: " read opc case $opc in "0") clear exit ;; "1") printf "{Package}<=: " read n equo update equo s $n printf "Want more in-depth research?\n" printf "y/N\n" read p if [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "Ok\n" elif [ "$p" == "y" ] || [ "$p" == "Y" ]; then emerge --searchdesc $n else printf "???\n" fi ;; "2") printf "[1]=> Online package\n[2]=> Local package\n[0]=> Exit\n{Opção}<=: " read op if [ "$op" == "0" ]; then clear exit elif [ "$op" == "1" ]; then printf "{Pacote}<=: " read pc date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pc >> /root/.dexter/dexter_log.txt nano /root/.dexter/dexter_log.txt printf "you can view the log in: /root/.dexter"; elif [ "$op" == "2" ]; then printf "Want to list some directory?\n" printf "s/N\n" read q if [ "$q" == "n" ] || [ "$q" == "N" ]; then printf "Ok\n" elif [ "$q" == "y" ] || [ "$q" == "Y" ]; then printf "{Dir}<=: " read d ls $d else printf "???\n" fi printf "Do you want to download a package?\n" printf "s/N\n" read p if [ "$p" == "y" ] || [ "$p" == "Y" ]; then printf "{Link}<=: " read l wget $l pack=$(ls *.tbz2) mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> /root/.dexter/dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "you can view the log in: /root/.dexter"; exit elif [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "{Package}<=: " read pack mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> /root/.dexter/dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "you can view the log in: /root/.dexter"; exit else printf "???\n" fi else printf "???\n" fi ;; *) printf "???\n" ;; esac # fim } else printf "Select you language || Selecione sua linguagem:\n"; printf "[1]=> Pt-Br\n[2]=> En-Us\n[0]=> Sair || Exit\n"; printf "{Option || Opção}<=: "; read o if [ "$o" == "1" ]; then mkdir /root/.dexter touch /root/.dexter/lang.db echo "Pt-Br" > /root/.dexter/lang.db elif [ "$o" == "2" ]; then mkdir /root/.dexter touch /root/.dexter/lang.db echo "En-Us" > /root/.dexter/lang.db elif [ "$o" == "0" ]; then clear exit else printf "???"; fi fi clear lang=$(cat /root/.dexter/lang.db) if [ "$lang" == "Pt-Br" ]; then br elif [ "$lang" == "En-Us" ]; then en else printf "???\n"; fi fi
Formatar o terminal com cores e efeitos
Script para verificaçăo do serviço do Apache (webserver) em sistemas Linux Ubun
buscar textos que contenham várias strings
Como gerar qualquer emoji ou símbolo unicode a partir do seu teclado
Instalar e Configurar o Slackware Linux em 2025
Como configurar os repositórios do apt no Debian 12 em 2025
Passkeys: A Evolução da Autenticação Digital
Instalação de distro Linux em computadores, netbooks, etc, em rede com o Clonezilla
Muitas dificuldades ao instalar distro Linux em Notebook Sony Vaio PCG-6131L (VPCEA24FM)
Slackpkg+ (Slackpkg Plus) está de volta!
Como dividir duas janelas igualmente e lado-a-lado na sua tela
Configurando o Conky para iniciar corretamente no sistema
3 configuraçőes básicas que podem melhorar muito a sua ediçăo pelo editor nano
Minha rede tem um espaço invisível que năo dá pra digitar o nome da re... (1)
Pedagogia no brasil năo passa de alfabetizaçăo por m4sturbaçăo mental ... (2)
compilaçăo samba 4.22 rock linux 9.5 (3)
Erro de segmentaçăo «Segmentation fault (core dumped)» ao retornar obj... (7)