[packages/lesspipe] suggest some commonly used tools (except for file archivers), example gpg -> gpg2 fallback
gotar
gotar at pld-linux.org
Wed Aug 31 01:46:38 CEST 2016
commit 964315f9a4183a858c2dfae74a23df1794f15c08
Author: Tomasz Pala <gotar at pld-linux.org>
Date: Wed Aug 31 01:45:18 2016 +0200
suggest some commonly used tools (except for file archivers),
example gpg -> gpg2 fallback
lesspipe.sh | 2 +-
lesspipe.spec | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/lesspipe.spec b/lesspipe.spec
index 7679297..66dc607 100644
--- a/lesspipe.spec
+++ b/lesspipe.spec
@@ -12,8 +12,11 @@ Group: Applications/Text
Source0: %{name}.sh
BuildRequires: rpmbuild(macros) >= 1.316
Suggests: file
+Suggests: gnupg
Suggests: highlight
Suggests: mailcap >= 2.3
+Suggests: objdump
+Suggests: openssl-tools
Conflicts: less < 394-7.1
Conflicts: tar < 1:1.22
BuildArch: noarch
diff --git a/lesspipe.sh b/lesspipe.sh
index dfba039..d7c89ca 100755
--- a/lesspipe.sh
+++ b/lesspipe.sh
@@ -124,7 +124,7 @@ lesspipe() {
*.crt) openssl x509 -noout -text -in "$1" ;;
*.p7s) openssl pkcs7 -noout -text -in "$1" -print_certs -inform DER;;
# gnupg armored files
- *.asc) gpg --homedir=/dev/null "$1" ;;
+ *.asc) command -v gpg >/dev/null && { gpg -nv --homedir=/dev/null "$1" || : ; } || gpg2 -nv --homedir=/dev/null "$1" ;;
*.gpg) gpg -d "$1" ;;
*.so) library_info "$1" ;;
# Possible manual pages
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lesspipe.git/commitdiff/964315f9a4183a858c2dfae74a23df1794f15c08
More information about the pld-cvs-commit
mailing list