Add Pascal
This commit is contained in:
parent
6d283cb3df
commit
afa2533f51
4 changed files with 35 additions and 0 deletions
5
docker/pascal/Dockerfile
Normal file
5
docker/pascal/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM frolvlad/alpine-fpc
|
||||
LABEL author="SpaceEEC"
|
||||
|
||||
COPY run.sh /var/run/
|
||||
WORKDIR /var/ws
|
11
docker/pascal/run.sh
Normal file
11
docker/pascal/run.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
echo "$1" > program.pas
|
||||
|
||||
# fpc does not use stderr, ld however does, capture both
|
||||
res="$(fpc program.pas 2>&1)"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
./program
|
||||
else
|
||||
echo "$res"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue