#!/usr/bin/perl local $\ = "\n"; $PYTHONEXE = "python2.4"; $OP = ""; if ( $ARGV[0] eq "-o" ) { $OP = shift @ARGV; } while ( @ARGV ) { $source; $filename = shift @ARGV; if ( $filename =~ /\.py$/ ) { $filenamePIR = $filename; $filenamePIR =~ s/\.py$/.pir/; $command = "$PYTHONEXE ./pyparrot.py $filename \> $filenamePIR"; `$command`; $source = $filenamePIR; } $bytecode = $filename; $bytecode =~ s/\.py$/.pbc/; $command = "../../../parrot -o $bytecode $source"; `$command`; if ( $OP ) { $command = "../../../parrot $OP $bytecode $source"; `$command`; } $command = "../../../parrot $source"; local $\ = ""; print `$command`; } $junk = << "JUNKJUNK" while [ $# -ge 1 ]; do ext=`echo $1 | sed s/.*\\\\.//` source=$1 if [ "$ext" == "py" ]; then python=$1 source=`echo $1 | sed s/\\\\.py$/.pir/` python2.4 pyparrot.py $python > $source fi cd ../../.. ./parrot languages/python/pyparrot/$source shift done JUNKJUNK