dasht: Import dasht-2.2.0 as wip/dasht
dasht is a collection of shell scripts for searching, browsing, and managing API documentation (in the form of 150+ offline documentation sets, courtesy of Dash for OS X) all from the comfort of your own terminal! The name "dasht" is a portmanteau of Dash and the letter "t", for terminal. Etymologically, "dasht" is Persian for plain, as in an flat expanse of land, which aptly characterizes the terminal environment where everything is text.
This commit is contained in:
parent
02171e2054
commit
d9ff94ef76
1
Makefile
1
Makefile
|
@ -484,6 +484,7 @@ SUBDIR+= darcs
|
|||
SUBDIR+= darcs-to-git
|
||||
SUBDIR+= darkcoin
|
||||
SUBDIR+= dart-git
|
||||
SUBDIR+= dasht
|
||||
SUBDIR+= datamash
|
||||
SUBDIR+= datapipe
|
||||
SUBDIR+= dates
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
dasht is a collection of shell scripts for searching, browsing,
|
||||
and managing API documentation (in the form of 150+ offline
|
||||
documentation sets, courtesy of Dash for OS X) all from the comfort
|
||||
of your own terminal!
|
||||
|
||||
The name "dasht" is a portmanteau of Dash and the letter "t", for
|
||||
terminal. Etymologically, "dasht" is Persian for plain, as in an
|
||||
flat expanse of land, which aptly characterizes the terminal
|
||||
environment where everything is text.
|
|
@ -0,0 +1,59 @@
|
|||
# $NetBSD$
|
||||
|
||||
DISTNAME= dasht-2.2.0
|
||||
CATEGORIES= textproc
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=sunaku/}
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= https://github.com/sunaku/dasht/
|
||||
COMMENT= Search API docs offline, in terminal or browser
|
||||
LICENSE= isc
|
||||
|
||||
USE_TOOLS+= wget:run
|
||||
|
||||
DEPENDS+= socat-[0-9]*:../../net/socat
|
||||
DEPENDS+= sqlite3-[0-9]*:../../databases/sqlite3
|
||||
DEPENDS+= w3m-[0-9]*:../../www/w3m
|
||||
|
||||
USE_LANGUAGES= # none
|
||||
|
||||
NO_BUILD= yes
|
||||
|
||||
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
|
||||
|
||||
DASHT_MANPAGES= \
|
||||
dasht-docsets-extract.1 \
|
||||
dasht-docsets-install.1 \
|
||||
dasht-docsets-remove.1 \
|
||||
dasht-docsets-update.1 \
|
||||
dasht-docsets.1 \
|
||||
dasht-query-exec.1 \
|
||||
dasht-query-html.1 \
|
||||
dasht-query-line.1 \
|
||||
dasht-server-http.1 \
|
||||
dasht-server.1 \
|
||||
dasht.1
|
||||
|
||||
DASHT_SCRIPTS= \
|
||||
dasht \
|
||||
dasht-docsets \
|
||||
dasht-docsets-extract \
|
||||
dasht-docsets-install \
|
||||
dasht-docsets-remove \
|
||||
dasht-docsets-update \
|
||||
dasht-query-exec \
|
||||
dasht-query-html \
|
||||
dasht-query-line \
|
||||
dasht-server \
|
||||
dasht-server-http
|
||||
|
||||
do-install:
|
||||
.for _m_ in ${DASHT_MANPAGES}
|
||||
${INSTALL_MAN} ${WRKSRC}/man/man1/${_m_} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
|
||||
.endfor
|
||||
.for _s_ in ${DASHT_SCRIPTS}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/${_s_} ${DESTDIR}${PREFIX}/bin
|
||||
.endfor
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -0,0 +1,23 @@
|
|||
@comment $NetBSD$
|
||||
bin/dasht
|
||||
bin/dasht-docsets
|
||||
bin/dasht-docsets-extract
|
||||
bin/dasht-docsets-install
|
||||
bin/dasht-docsets-remove
|
||||
bin/dasht-docsets-update
|
||||
bin/dasht-query-exec
|
||||
bin/dasht-query-html
|
||||
bin/dasht-query-line
|
||||
bin/dasht-server
|
||||
bin/dasht-server-http
|
||||
man/man1/dasht-docsets-extract.1
|
||||
man/man1/dasht-docsets-install.1
|
||||
man/man1/dasht-docsets-remove.1
|
||||
man/man1/dasht-docsets-update.1
|
||||
man/man1/dasht-docsets.1
|
||||
man/man1/dasht-query-exec.1
|
||||
man/man1/dasht-query-html.1
|
||||
man/man1/dasht-query-line.1
|
||||
man/man1/dasht-server-http.1
|
||||
man/man1/dasht-server.1
|
||||
man/man1/dasht.1
|
|
@ -0,0 +1,9 @@
|
|||
$NetBSD$
|
||||
|
||||
SHA1 (dasht-2.2.0.tar.gz) = 1547f5a0409e1a608aaaae7e26882ba802cfc4ad
|
||||
RMD160 (dasht-2.2.0.tar.gz) = 06a64bbf6c8735a8160239998a6d66ebbd27bf22
|
||||
SHA512 (dasht-2.2.0.tar.gz) = c6f8963dda52fc590a1570e81256a8da0534cdec08d404c71437b475192145d2dd4c1445d343db4e1688ba57a373695243d8269c048181ac8bc4e873623c7cbd
|
||||
Size (dasht-2.2.0.tar.gz) = 23282 bytes
|
||||
SHA1 (patch-bin_dasht) = d4d49432db853ffeeb7b1ff610da074d297be9d7
|
||||
SHA1 (patch-bin_dasht-docsets-install) = 544471842df43f8328bc187c0d2de78e335e731b
|
||||
SHA1 (patch-bin_dasht-docsets-remove) = e003e74fdf46a5756a8214bc3ddcf1a839ce1b96
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD$
|
||||
|
||||
Just use pgrep(1) instead of a complex (and fragile) ps-piped-with-sed.
|
||||
|
||||
--- bin/dasht.orig 2017-08-16 03:30:44.000000000 +0000
|
||||
+++ bin/dasht
|
||||
@@ -71,7 +71,7 @@ if ! dasht-query-html "$@"; then
|
||||
|
||||
# emulate pipefail (which POSIX lacks) by killing off the w3m(1) process
|
||||
# below (which starts up simultaneously alongside this pipeline segment)
|
||||
- kill $(ps -e -o comm,ppid,pid | sed -n "s/^w3m *$$ //p")
|
||||
+ kill $(pgrep -P $$ w3m)
|
||||
|
||||
# and then proceed to tell this script to generate a nonzero exit status
|
||||
kill -s USR1 $$
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD$
|
||||
|
||||
Just use sh(1) `read' command to get the confirmation from the user.
|
||||
|
||||
--- bin/dasht-docsets-install.orig 2017-08-16 03:30:44.000000000 +0000
|
||||
+++ bin/dasht-docsets-install
|
||||
@@ -86,7 +86,7 @@ printf "Installable docsets ($#):\n\n\t%
|
||||
trap exit INT # let Control-C abort `xargs -p` when running under bash(1)
|
||||
for docset; do
|
||||
test -n "$force" || # don't ask for confirmation when it's being forced
|
||||
- echo "Install $docset docset [y/N]" | xargs -p | grep -q . || continue
|
||||
+ { printf "Install $docset docset [y/N]"; read r; [ "$r" = "y" ] || continue ; }
|
||||
|
||||
basename="$docset".tgz
|
||||
tgz="$DASHT_DOCSETS_DIR/$basename"
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD$
|
||||
|
||||
Just use sh(1) `read' command to get the confirmation from the user.
|
||||
|
||||
--- bin/dasht-docsets-remove.orig 2017-08-16 03:30:44.000000000 +0000
|
||||
+++ bin/dasht-docsets-remove
|
||||
@@ -60,7 +60,7 @@ printf "Removable docsets ($#):\n\n\t%s\
|
||||
trap exit INT # let Control-C abort `xargs -p` when running under bash(1)
|
||||
for docset; do
|
||||
test -n "$force" || # don't ask for confirmation when it's being forced
|
||||
- echo "Remove $docset docset [y/N]" | xargs -p | grep -q . || continue
|
||||
+ { printf "Remove $docset docset [y/N]"; read r; [ "$r" = "y" ] || continue ; }
|
||||
|
||||
rootname="$DASHT_DOCSETS_DIR/$docset"
|
||||
rm -v -f -r "$rootname".docset \
|
Loading…
Reference in New Issue