From db6a8466df0414b27d857a8d3d995950e51fd7e8 Mon Sep 17 00:00:00 2001 From: eudoxia Date: Sat, 3 Jul 2021 04:21:56 -0400 Subject: md.sh: replaced fzf dependency with fzy --- md.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/md.sh b/md.sh index c5578f4..90f94c4 100755 --- a/md.sh +++ b/md.sh @@ -7,7 +7,7 @@ usage="usage: # input: /src.md ./md-header ./md-footer /nav.html # output: /index.html -# dependencies: lowdown fzf ./urlencode +# dependencies: lowdown, fzy, ./urlencode # Copyright 2019-2021 DistressNetwork° # @@ -111,7 +111,7 @@ done toc() { -[ "$(which fzf)" ] || { printf "[warn] \tfzf not found, skipping toc\n" ; return ; } +[ "$(which fzy)" ] || { printf "[warn] \tfzy not found, skipping toc\n" ; return ; } [ -f ./urlencode ] || { printf "[warn] \turlencode not found, skipping toc\n" ; return ; } tmp=$(mktemp -p /tmp) # using a tempfile, more convenient for storage and operations @@ -134,7 +134,7 @@ cat $tmp | while IFS='' read -r data ; do sed -e "s;^
  • \(${ID}\);
  • ${HEADER};" -e "s;\([[:alnum:]]\)
  • $;\1;" -i'' $tmp ; # find old id in output, replace with new id - IDLINE=$(grep -ne "^.*${HEADER}