Add markup for headings in logs
This commit is contained in:
parent
56601510e2
commit
b391602c67
25
Dockerfile
25
Dockerfile
|
@ -43,6 +43,13 @@ RUN \
|
|||
|| true
|
||||
|
||||
RUN \
|
||||
printHeading() { \
|
||||
local heading; \
|
||||
heading="====================================================="; \
|
||||
echo "$heading"; \
|
||||
[ -z "$1" ] && cat || echo "$1"; \
|
||||
echo "$heading"; \
|
||||
}; \
|
||||
wget "${KEIL_URL}" --progress=bar:force:noscroll -O MDK537.exe; \
|
||||
[ $DEBUG -eq 1 ] && { \
|
||||
mkdir -p logs; \
|
||||
|
@ -75,7 +82,7 @@ RUN \
|
|||
}; \
|
||||
# Run actual MDK537 installer
|
||||
install_keil() { \
|
||||
echo "Starting ARM Keil installation"; \
|
||||
printHeading "Starting ARM Keil installation"; \
|
||||
try="$1"; \
|
||||
logFile="$(mktemp)"; \
|
||||
# Run installer asynchronously
|
||||
|
@ -128,12 +135,14 @@ RUN \
|
|||
[ "$exitCode" -eq 42 ] && mv "$logFile" "logs/timeout-handled-try$try.log"; \
|
||||
[ "$exitCode" -ne 0 ] && mv "$logFile" "logs/fail-try$try.log"; \
|
||||
}; \
|
||||
[ "$exitCode" -ne 0 ] && { \
|
||||
[ "$exitCode" -eq 42 ] && echo "The installation Got Stuck" || \
|
||||
echo "The Installation Failed"; \
|
||||
} || \
|
||||
echo "The Installation Was Successful"; \
|
||||
echo "Installation Process Exited With Code $exitCode"; \
|
||||
{ \
|
||||
[ "$exitCode" -ne 0 ] && { \
|
||||
[ "$exitCode" -eq 42 ] && echo "The installation Got Stuck" || \
|
||||
echo "The Installation Failed"; \
|
||||
} || \
|
||||
echo "The Installation Was Successful"; \
|
||||
echo "Installation Process Exited With Code $exitCode"; \
|
||||
} | printHeading; \
|
||||
return "$exitCode"; \
|
||||
}; \
|
||||
display=:90; \
|
||||
|
@ -158,7 +167,7 @@ RUN \
|
|||
"$y" \
|
||||
; \
|
||||
do \
|
||||
echo "Restarting Installation"; \
|
||||
printHeading "Restarting Installation"; \
|
||||
# Increase counter
|
||||
y="$(expr "$y" + 1)"; \
|
||||
done && \
|
||||
|
|
Loading…
Reference in a new issue