Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multiple azcopy logfiles #61

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.17
0.0.19
11 changes: 7 additions & 4 deletions scripts/wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,13 @@ log "Sending e-mail to ${MAILTO} from ${MAILFROM}."

attachments="${mailattachopt} ${LOGFILE}"

azcopy_logfile=$(grep '^Log file is located at: .*\.log$' ${LOGFILE} | sed -e 's/Log file is located at: \(.*\)/\1/')

if [ ! "${azcopy_logfile}" = "" ]; then
attachments="${attachments} ${mailattachopt} ${azcopy_logfile}"
azcopy_logfiles=$(grep '^Log file is located at: .*\.log$' ${LOGFILE} | sed -e 's/Log file is located at: \(.*\)/\1/' | sed 's/\r$//' | tr '\n' ' ' | sed 's/ $//g')
if ! [ "${azcopy_logfiles}" = "" ]; then
for azcopy_logfile in ${azcopy_logfiles}; do
if [ ! "${azcopy_logfile}" = "" ] && [ -f "${azcopy_logfile}" ]; then
attachments="${attachments} ${mailattachopt} ${azcopy_logfile}"
fi
done
fi

attachments="${attachments} --"
Expand Down