#!/bin/bash # # Compile with P5 using FreePascal # # Execute with: # # p5 # # Where is the name of the source file without # extention. The Pascal file is compiled and run. # Any compiler errors are output to the screen. # Input and output to and from the running program # are from the console. # The intermediate code is placed in .p5. # if [ -z "\$1" ] then echo "*** Error: Missing parameter" exit 1 fi if [ ! -f \$1.pas ] then echo "*** Error: Missing \$1.pas file" exit 1 fi echo Compiling and running \$1 echo pcom < \$1.pas > \$1.p5 pint < \$1.p5