From 5b4dcd9c9e1e4b2d3bc12fa5953b3de1e273f034 Mon Sep 17 00:00:00 2001 From: Sleeping Crows Date: Thu, 18 May 2023 23:06:42 -0400 Subject: [PATCH] First pass on dependency checks. --- Furaffinity/fa.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Furaffinity/fa.sh b/Furaffinity/fa.sh index 611b53a..06b773b 100755 --- a/Furaffinity/fa.sh +++ b/Furaffinity/fa.sh @@ -8,6 +8,36 @@ maxsubs=52089873 #sets the default maximum bound of submission depth minsubs=0 #sets the default minimum bound of submission depth minsubarg=$2 + +#Check for dependencies +if command -v curl >/dev/null 2>&1 ; then + : +else + echo "curl is not available. exiting." + exit +fi + +if command -v xdg-open >/dev/null 2>&1 ; then + : +else + echo "xdg-open is not available. exiting." + exit +fi + +if command -v shuf >/dev/null 2>&1 ; then + : +else + echo "shuf is not available. exiting." + exit +fi + +if command -v grep >/dev/null 2>&1 ; then + : +else + echo "grep is not available. exiting." + exit +fi + echo "===FA.SH: The Random FA Sub Generator===" validate=1