From 053b3ef75f85a1bcd9db8880efde4b62b08e1cdd Mon Sep 17 00:00:00 2001 From: TRBC Developer <5380239-trbcdev@users.noreply.gitlab.com> Date: Mon, 22 Jan 2024 16:46:56 +0000 Subject: [PATCH] Adding in questions --- Run.sh | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/Run.sh b/Run.sh index cf02f6a..f0a3a00 100644 --- a/Run.sh +++ b/Run.sh @@ -1,9 +1,41 @@ #!/bin/bash -./Find_Missing_Addresses.sh +echo "Welcome! It must be the start of a new year! In order to get started with sorting and merging the PDF documents I need to know a little more information." +echo +echo + +while : +do + echo "Where is the directory that has the PDF statments with address?" + read PDFDIR + if [ -d $PDFDIR ] + then + break + else + echo "Directory not found." + fi +done + +#Get the folder for the output file. +while : +do + echo + echo "What output directory do you want for the sorted PDF's?" + read OUTPUTFOLDER + #OUTPUTFOLDER="/home/btmccrea/Downloads/output" + if [ -d $OUTPUTFOLDER ] + then + break + else + echo "Directory not found." + fi +done + + +./Find_Missing_Addresses.sh $PDFDIR $OUTPUTFOLDER read -r -p "Do you want to continue? [Y/n]" response response=${response,,} # tolower if [[ $response =~ ^(y| ) ]] || [[ -z $response ]]; then - ./Sort_and_Merge_Files.sh + ./Sort_and_Merge_Files.sh $PDFDIR $OUTPUTFOLDER fi