My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

upgrade 658 B

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