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