pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/prettyping Add prettyping, a wrapper to colorize a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e9ec803571f
branches:  trunk
changeset: 771691:5e9ec803571f
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Wed Dec 22 16:16:29 2021 +0000

description:
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:

 net/prettyping/DESCR                    |  10 ++++++++++
 net/prettyping/Makefile                 |  29 +++++++++++++++++++++++++++++
 net/prettyping/PLIST                    |   2 ++
 net/prettyping/distinfo                 |   6 ++++++
 net/prettyping/patches/patch-prettyping |  24 ++++++++++++++++++++++++
 5 files changed, 71 insertions(+), 0 deletions(-)

diffs (91 lines):

diff -r 66af4128ea7f -r 5e9ec803571f net/prettyping/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/prettyping/DESCR      Wed Dec 22 16:16:29 2021 +0000
@@ -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 -r 66af4128ea7f -r 5e9ec803571f net/prettyping/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/prettyping/Makefile   Wed Dec 22 16:16:29 2021 +0000
@@ -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@localhost
+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 -r 66af4128ea7f -r 5e9ec803571f net/prettyping/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/prettyping/PLIST      Wed Dec 22 16:16:29 2021 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2021/12/22 16:16:29 schmonz Exp $
+bin/prettyping
diff -r 66af4128ea7f -r 5e9ec803571f net/prettyping/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/prettyping/distinfo   Wed Dec 22 16:16:29 2021 +0000
@@ -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 -r 66af4128ea7f -r 5e9ec803571f net/prettyping/patches/patch-prettyping
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/prettyping/patches/patch-prettyping   Wed Dec 22 16:16:29 2021 +0000
@@ -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!



Home | Main Index | Thread Index | Old Index