My build of nnn with minor changes
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

26 linhas
660 B

  1. #!/usr/bin/env sh
  2. # Description: Check and update to latest version of nnn manually on Debian 9 Stretch
  3. #
  4. # Note: This script installs a package, should be issued with admin privilege
  5. #
  6. # Shell: POSIX-compliant
  7. # Author: Arun Prakash Jana
  8. cur="$(nnn -v)"
  9. new="$(curl -s "https://github.com/jarun/nnn/releases/latest" | grep -Eo "[0-9]+\.[0-9]+")"
  10. if [ "$cur" = "$new" ]; then
  11. echo 'Already at latest version'
  12. exit 0
  13. fi
  14. # get the package
  15. curl -Ls -O "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb"
  16. # install it
  17. sudo dpkg -i nnn_"$new"-1_debian9.amd64.deb
  18. # remove the file
  19. rm -rf nnn_"$new"-1_debian9.amd64.deb