Exit if lynx not found
Anirudh Oppiliappan x@icyphox.sh
Wed, 09 Dec 2020 09:54:55 +0530
1 files changed,
6 insertions(+),
0 deletions(-)
jump to
M
bin/plaintext.sh
→
bin/plaintext.sh
@@ -3,6 +3,12 @@
# from the pure sh bible; see: # https://github.com/dylanaraps/pure-sh-bible#get-the-base-name-of-a-file-path +if ! command -v lynx &> /dev/null +then + printf '%s\n' "lynx not found, not going to run" + exit +fi + for p in build/blog/**/index.html; do ppath="${p%%\/index.html}" pname="${ppath##build\/blog\/}"