Dexter versăo 2.0 - Instalador de pacotes para Sabayon

Publicado por hp (última atualizaçăo em 03/08/2018)

[ Hits: 2.201 ]

Homepage: https://byhackerperito.blogspot.com

Download dexter-v2.0.tar.gz




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!

  



Esconder código-fonte

#!/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

Scripts recomendados

Proteçăo de tela automática com xlock

Identificando sinal de rede sem fio em modo texto

Script de backup

Agenda de Contatos

Acesse seus host por vncviewer


  

Comentários
[1] Comentário enviado por albfneto em 08/08/2018 - 20:40h

vou testar este também!
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
Albfneto,
Ribeirão Preto, S.P., Brasil.
Usuário Linux, Linux Counter: #479903.
Distros Favoritas: [i] Sabayon, Gentoo, OpenSUSE, Mageia e OpenMandriva[/i].

[2] Comentário enviado por perito em 11/08/2018 - 11:55h


[1] Comentário enviado por albfneto em 08/08/2018 - 20:40h

vou testar este também!
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
Albfneto,
Ribeirão Preto, S.P., Brasil.
Usuário Linux, Linux Counter: #479903.
Distros Favoritas: [i] Sabayon, Gentoo, OpenSUSE, Mageia e OpenMandriva[/i].


versão 2.0 obsoleta!
não funciona direito pelo fato do sistema de log travar as permissões!
baixem a versão 2.5 aqui: https://opensoftwarepro.wordpress.com
abraços!


Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts