From 05a7431d21a6f9775b7f0f0204bb363e38cde279 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 6 May 2020 04:07:32 +0300 Subject: [PATCH] Make errors more informative --- scrape.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scrape.sh b/scrape.sh index 6017060..488526e 100755 --- a/scrape.sh +++ b/scrape.sh @@ -29,7 +29,7 @@ dir=general/$2 url=https://psbdmp.ws/api/search/$2 mkdir -p ./output/$dir/ scrape -elif [[ $2 == '' ]]; then +elif [[ $1 == '-g' ]] && [[ $2 == '' ]]; then echo "Missing Value. Try to run ./script.sh -g " exit 0 fi @@ -39,7 +39,7 @@ dir=email/$2 url=https://psbdmp.ws/api/search/email/$2 mkdir -p ./output/$dir/ scrape -elif [[ $2 == '' ]]; then +elif [[ $1 == '-e' ]] && [[ $2 == '' ]]; then echo "Missing Value. Try to run ./script.sh -e " exit 0 fi @@ -49,7 +49,7 @@ dir=domain/$2 url=https://psbdmp.ws/api/search/domain/$2 mkdir -p ./output/$dir/ scrape -elif [[ $2 == '' ]]; then +elif [[ $1 == '-d' ]] && [[ $2 == '' ]]; then echo "Missing Value. Try to run ./script.sh -d " exit 0 fi