From d6894efe83ba5113bb56e3e01f6dd29ae9a2ef12 Mon Sep 17 00:00:00 2001 From: SleepingCrows Date: Wed, 17 May 2023 12:33:05 -0400 Subject: [PATCH] First pass on Submission count input validation. --- Furaffinity/fa.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Furaffinity/fa.sh b/Furaffinity/fa.sh index 5ac94a7..3e67fbd 100644 --- a/Furaffinity/fa.sh +++ b/Furaffinity/fa.sh @@ -9,6 +9,17 @@ minsubs=0 #sets the default minimum bound of submission depth minsubarg=$2 echo "===FA.SH: The Random FA Sub Generator===" +# Check if the rep argument was filled already, test for non-numbers. + +if [ -n "$rep"]; then + if [[ $rep != [0-9]* ]]; then + echo "Sumbssion Count Argument is not an integer" + exit + else + fi +fi + +# Todo: Validate the rep count is only numbers. if [[ -z "$rep" ]]; then echo "///" echo "How many submissions to pull? (Default: 1)"