Cleanup debug dependencies

This commit is contained in:
Manuel Thalmann 2023-03-25 21:30:33 +01:00
parent f5fe56aa40
commit 16e4423205

View file

@ -22,9 +22,6 @@ RUN \
xmlstarlet \ xmlstarlet \
&& { \ && { \
[ "$DEBUG" -eq 1 ] \ [ "$DEBUG" -eq 1 ] \
&& apt-get install -y \
build-essential \
imagemagick \
|| true; \ || true; \
} \ } \
&& rm -rf /var/lib/apt/lists/ && rm -rf /var/lib/apt/lists/
@ -33,16 +30,23 @@ RUN pip install pyocd
RUN \ RUN \
[ "$DEBUG" -eq 1 ] && { \ [ "$DEBUG" -eq 1 ] && { \
apt-get update; \
apt-get install -y \
build-essential \
imagemagick; \
rm -rf /var/lib/apt/lists; \
export TIV="$(mktemp)"; \
git clone https://github.com/stefanhaustein/TerminalImageViewer.git && \ git clone https://github.com/stefanhaustein/TerminalImageViewer.git && \
cd TerminalImageViewer/src/main/cpp && \ cd TerminalImageViewer/src/main/cpp && \
make && \ make && \
make install && \ apt-get remove -y build-essential && \
apt-get autoremove -y && \
mv tiv "$TIV" && \
cd - && \ cd - && \
rm -rf TerminalImageViewer; \ rm -rf TerminalImageViewer; \
} \ mkdir -p logs; \
|| true mkdir -p screens; \
} || true; \
RUN \
printHeading() { \ printHeading() { \
local heading; \ local heading; \
heading="====================================================="; \ heading="====================================================="; \
@ -51,11 +55,6 @@ RUN \
echo "$heading"; \ 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 ] && { \
mkdir -p logs; \
mkdir -p screens; \
} \
|| true && \
# Handle console output of MDK537 installer # Handle console output of MDK537 installer
handle_output() { \ handle_output() { \
# A pattern that is supposed to indicates that wine got stuck # A pattern that is supposed to indicates that wine got stuck
@ -115,7 +114,7 @@ RUN \
# Create screenshot and print it to the console # Create screenshot and print it to the console
fileName="screens/install-try$try-$x.png"; \ fileName="screens/install-try$try-$x.png"; \
import -window root "$fileName"; \ import -window root "$fileName"; \
tiv -w 10000 -h 10000 "$fileName"; \ "$TIV" -w 10000 -h 10000 "$fileName"; \
x="$(expr "$x" + 1)"; \ x="$(expr "$x" + 1)"; \
echo "Frame #$x"; \ echo "Frame #$x"; \
sleep 1; \ sleep 1; \
@ -172,10 +171,15 @@ RUN \
y="$(expr "$y" + 1)"; \ y="$(expr "$y" + 1)"; \
done && \ done && \
kill -9 "$displayPID" > /dev/null 2>&1; \ kill -9 "$displayPID" > /dev/null 2>&1; \
# Delete unfinished installations # Cleanup Unnecessary Files
rm -f "$TIV"; \
rm -rf "$(/usr/bin/entrypoint winepath 'C:\Keil_v5')/Backup."*; \ rm -rf "$(/usr/bin/entrypoint winepath 'C:\Keil_v5')/Backup."*; \
rm MDK537.exe; \ rm MDK537.exe; \
rm -f /tmp/.X*-lock; rm -f /tmp/.X*-lock; \
[ "$DEBUG" -eq 1 ] && { \
apt-get remove -y imagemagick; \
apt-get autoremove -y; \
}
RUN \ RUN \
keilConfig="$(/usr/bin/entrypoint winepath 'C:\Keil_v5\TOOLS.INI')" && \ keilConfig="$(/usr/bin/entrypoint winepath 'C:\Keil_v5\TOOLS.INI')" && \