| #!/bin/sh |
| |
| |
| |
| |
| |
| |
| if [ -z "$PYCGEN_PYTHON" ]; then |
| pycompile='python' |
| else |
| pycompile="$PYCGEN_PYTHON" |
| fi |
| |
| refdir=$(pwd) |
| |
| for pysrc in $@; do |
| basename=$(basename "$pysrc"); |
| dstdir=$(dirname "$pysrc") |
| |
| if [ -z "$dstdir" ]; then |
| dstdir='.' |
| fi |
| |
| cd "$dstdir" || exit 2 |
| "$pycompile" -m py_compile "$basename" || exit 2 |
| cd "$refdir" |
| done |
| |
| exit 0 |