Updated formatting of checkExist output

This commit is contained in:
Asif Bacchus 2018-09-19 17:11:11 -06:00
parent 98e901eb11
commit a00e6ee364

View File

@ -44,26 +44,26 @@ function checkExist {
# find file # find file
if [ -e "$2" ]; then if [ -e "$2" ]; then
# found # found
echo -e "${normal}${stamp} File found: ${yellow}${2}${normal}" \ echo -e "${normal}${stamp} File found:" \
>> $logFileVerbose "${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
return 0 return 0
else else
# not found # not found
echo -e "${red}${stamp} File NOT found: ${yellow}${2}${normal}" \ echo -e "${red}${stamp} File NOT found:"\
>> $logFileVerbose "${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
return 1 return 1
fi fi
elif [ "$1" = "fd" ]; then elif [ "$1" = "fd" ]; then
# find directory # find directory
if [ -d "$2" ]; then if [ -d "$2" ]; then
# found # found
echo -e "${normal}${stamp} Dir found: ${yellow}${2}${normal}" \ echo -e "${normal}${stamp} Dir found:" \
>> $logFileVerbose "${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
return 0 return 0
else else
# not found # not found
echo -e "${red}${stamp} Dir NOT found: ${yellow}${2}${normal}" \ echo -e "${red}${stamp} Dir NOT found:" \
>> $logFileVerbose "${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
return 1 return 1
fi fi
fi fi