Updated formatting of checkExist output
This commit is contained in:
parent
98e901eb11
commit
a00e6ee364
16
backup.sh
16
backup.sh
@ -44,26 +44,26 @@ function checkExist {
|
||||
# find file
|
||||
if [ -e "$2" ]; then
|
||||
# found
|
||||
echo -e "${normal}${stamp} File found: ${yellow}${2}${normal}" \
|
||||
>> $logFileVerbose
|
||||
echo -e "${normal}${stamp} File found:" \
|
||||
"${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
|
||||
return 0
|
||||
else
|
||||
# not found
|
||||
echo -e "${red}${stamp} File NOT found: ${yellow}${2}${normal}" \
|
||||
>> $logFileVerbose
|
||||
echo -e "${red}${stamp} File NOT found:"\
|
||||
"${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
|
||||
return 1
|
||||
fi
|
||||
elif [ "$1" = "fd" ]; then
|
||||
# find directory
|
||||
if [ -d "$2" ]; then
|
||||
# found
|
||||
echo -e "${normal}${stamp} Dir found: ${yellow}${2}${normal}" \
|
||||
>> $logFileVerbose
|
||||
echo -e "${normal}${stamp} Dir found:" \
|
||||
"${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
|
||||
return 0
|
||||
else
|
||||
# not found
|
||||
echo -e "${red}${stamp} Dir NOT found: ${yellow}${2}${normal}" \
|
||||
>> $logFileVerbose
|
||||
echo -e "${red}${stamp} Dir NOT found:" \
|
||||
"${bold}${yellow}${2}${normal}" >> "$logFileVerbose"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user