Skip to content

Commit 2200b04

Browse files
committed
Check: validate that exist w3m else return normal
1 parent 5f55a30 commit 2200b04

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

check.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ do
2323
if ! [[ "$url_output" =~ ^('Hello World!')(.*)(([0-9]*):(([0-9]+([.][0-9]*)?|[.][0-9]+)):([0-9]*))$ ]]; then
2424
echo -e "${RED}${ERROR} $fw ${NC}"
2525
echo "$url"
26-
echo "$url_output" | w3m -dump -T text/html
26+
if [ -x "$(command -v w3m)" ]; then
27+
echo "$url_output" | w3m -dump -T text/html
28+
else
29+
echo "$url_output"
30+
fi
2731
FAIL=1
2832
else
2933
echo -e "${GREEN}${OK} $fw ${NC}"

0 commit comments

Comments
 (0)