pkgsrc-wip/dasht/patches/patch-bin_dasht-docsets-remove

16 lines
638 B
Plaintext

$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 \