2020-06-07 09:43:41 +02:00
|
|
|
cat > program.pas
|
2019-07-09 11:19:41 +02:00
|
|
|
|
|
|
|
# fpc does not use stderr, ld however does, capture both
|
|
|
|
res="$(fpc program.pas 2>&1)"
|
|
|
|
|
|
|
|
if [ $? -eq 0 ]; then
|
2020-06-17 07:43:31 +02:00
|
|
|
./program
|
2019-07-09 11:19:41 +02:00
|
|
|
else
|
|
|
|
printf %s "$res"
|
|
|
|
fi
|