diff options
author | schmonz <schmonz@pkgsrc.org> | 2021-12-22 16:16:29 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2021-12-22 16:16:29 +0000 |
commit | 12770839573dc785bd79ff0fb501daaeb39e3930 (patch) | |
tree | 93c0753ad998d3082db5d3d15a84915e868106fb /net/prettyping | |
parent | 1a1cb161db05b7564ab3d46772425306220841b0 (diff) | |
download | pkgsrc-12770839573dc785bd79ff0fb501daaeb39e3930.tar.gz |
Add prettyping, a wrapper to colorize and simplify ping's output.
`prettyping` runs the standard `ping` in the background and parses its
output, showing the ping responses in a *graphical* way at the terminal
(by using colors and Unicode characters).
`prettyping` is written in `bash` and `awk`, and is reported to work on
many different systems and different versions of `awk`.
Diffstat (limited to 'net/prettyping')
-rw-r--r-- | net/prettyping/DESCR | 10 | ||||
-rw-r--r-- | net/prettyping/Makefile | 29 | ||||
-rw-r--r-- | net/prettyping/PLIST | 2 | ||||
-rw-r--r-- | net/prettyping/distinfo | 6 | ||||
-rw-r--r-- | net/prettyping/patches/patch-prettyping | 24 |
5 files changed, 71 insertions, 0 deletions
diff --git a/net/prettyping/DESCR b/net/prettyping/DESCR new file mode 100644 index 00000000000..2436037ad9d --- /dev/null +++ b/net/prettyping/DESCR @@ -0,0 +1,10 @@ +`prettyping` is a wrapper around the standard `ping` tool with the +objective of making the output prettier, more colorful, more compact, +and easier to read. + +`prettyping` runs the standard `ping` in the background and parses its +output, showing the ping responses in a *graphical* way at the terminal +(by using colors and Unicode characters). + +`prettyping` is written in `bash` and `awk`, and is reported to work on +many different systems and different versions of `awk`. diff --git a/net/prettyping/Makefile b/net/prettyping/Makefile new file mode 100644 index 00000000000..f6c1593ce59 --- /dev/null +++ b/net/prettyping/Makefile @@ -0,0 +1,29 @@ +# $NetBSD: Makefile,v 1.1 2021/12/22 16:16:29 schmonz Exp $ + +GITHUB_TAG= refs/tags/v${PKGVERSION_NOREV} +DISTNAME= prettyping-1.0.1 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_GITHUB:=denilsonsa/} + +MAINTAINER= schmonz@NetBSD.org +HOMEPAGE= https://github.com/denilsonsa/prettyping/ +COMMENT= Wrapper to colorize and simplify ping's output +LICENSE= mit + +WRKSRC= ${WRKDIR}/${DISTNAME} + +USE_LANGUAGES= # none +NO_BUILD= yes + +USE_TOOLS+= bash:run +REPLACE_INTERPRETER+= bash +REPLACE.bash.old= /usr/bin/env bash +REPLACE.bash.new= ${BASH} +REPLACE_FILES.bash= ${PKGBASE} + +INSTALLATION_DIRS= bin + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PKGBASE} ${DESTDIR}${PREFIX}/bin + +.include "../../mk/bsd.pkg.mk" diff --git a/net/prettyping/PLIST b/net/prettyping/PLIST new file mode 100644 index 00000000000..185e8d45939 --- /dev/null +++ b/net/prettyping/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1 2021/12/22 16:16:29 schmonz Exp $ +bin/prettyping diff --git a/net/prettyping/distinfo b/net/prettyping/distinfo new file mode 100644 index 00000000000..077b4653a75 --- /dev/null +++ b/net/prettyping/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2021/12/22 16:16:29 schmonz Exp $ + +BLAKE2s (prettyping-1.0.1.tar.gz) = 0bb8630087e703943d0d0c42b3b2b997bee0749a4a8cf5a3b30df3f4906dfb8b +SHA512 (prettyping-1.0.1.tar.gz) = 967626f11cd58fd9a0ce91a320caf6b6a296681ed809e04188f0cfe00d03c80a3620bf4d3ec86e855be363810763ff3ccd8bb0a959d03e62b31edba2cfae7f79 +Size (prettyping-1.0.1.tar.gz) = 10104 bytes +SHA1 (patch-prettyping) = 1ebd90dd1a7691eb02b64f789ee472c61d82a2ee diff --git a/net/prettyping/patches/patch-prettyping b/net/prettyping/patches/patch-prettyping new file mode 100644 index 00000000000..f587626bd8f --- /dev/null +++ b/net/prettyping/patches/patch-prettyping @@ -0,0 +1,24 @@ +$NetBSD: patch-prettyping,v 1.1 2021/12/22 16:16:29 schmonz Exp $ + +Borrow IPv6 fixes for BSD and macOS from Homebrew. + +--- prettyping.orig 2017-04-03 07:49:23.000000000 +0000 ++++ prettyping +@@ -742,7 +742,7 @@ BEGIN { + ############################################################ + # Main loop + { +- if ( $0 ~ /^[0-9]+ bytes from .*: icmp_[rs]eq=[0-9]+ ttl=[0-9]+ time=[0-9.]+ *ms/ ) { ++ if ( $0 ~ /^[0-9]+ bytes from .*[:,] icmp_[rs]eq=[0-9]+ (ttl|hlim)=[0-9]+ time=[0-9.]+ *ms/ ) { + # Sample line from ping: + # 64 bytes from 8.8.8.8: icmp_seq=1 ttl=49 time=184 ms + if ( other_line_times >= 2 ) { +@@ -751,7 +751,7 @@ BEGIN { + + # $1 = useless prefix string + # $2 = icmp_seq +- # $3 = ttl ++ # $3 = ttl/hlim + # $4 = time + + # This must be called before incrementing the last_seq variable! |