2019-05-15 02:21:34 +02:00
|
|
|
mkdir "$COUNT" && cd "$COUNT"
|
|
|
|
|
2019-03-13 05:37:28 +01:00
|
|
|
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
|
2019-05-15 02:21:34 +02:00
|
|
|
|
|
|
|
cd .. && rm -rf "$COUNT"
|