File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,17 @@ RUN dnf -y module enable python39 && \
3030
3131# Free Pascal 3.0.4
3232RUN cd /opt && \
33- curl -L -o fpc-3.0.4-1.x86_64.rpm 'https://sourceforge.net/projects/freepascal/files/Linux/3.0.4/fpc-3.0.4-1.x86_64.rpm/download' && \
33+ curl -L -H "Accept: */*" -H "Accept-Language: en-US,en;q=0.9" \
34+ -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36" \
35+ -o fpc-3.0.4-1.x86_64.rpm \
36+ 'https://sourceforge.net/projects/freepascal/files/Linux/3.0.4/fpc-3.0.4-1.x86_64.rpm/download' && \
37+ FILE_SIZE=$(stat -c%s fpc-3.0.4-1.x86_64.rpm 2>/dev/null || echo 0) && \
38+ if [ "$FILE_SIZE" -lt 1000000 ]; then \
39+ echo "Downloaded file too small ($FILE_SIZE bytes), trying alternative URL..." ; \
40+ rm -f fpc-3.0.4-1.x86_64.rpm; \
41+ curl -L -f -o fpc-3.0.4-1.x86_64.rpm 'http://downloads.sourceforge.net/project/freepascal/Linux/3.0.4/fpc-3.0.4-1.x86_64.rpm' ; \
42+ fi && \
43+ [ $(stat -c%s fpc-3.0.4-1.x86_64.rpm) -gt 1000000 ] && \
3444 rpm -i fpc-3.0.4-1.x86_64.rpm && \
3545 rm -f fpc-3.0.4-1.x86_64.rpm
3646
You can’t perform that action at this time.
0 commit comments