]> git.phdru.name Git - dotfiles.git/blobdiff - bin/compyle
Fix(bin/cp_recode_fname): Fix misspelled message
[dotfiles.git] / bin / compyle
index 260788add0857902ab4a14b1a546f9553bcec4f7..da48caf1d99a6e28bba6c015f510303156c8f73f 100755 (executable)
@@ -1,17 +1,9 @@
 #! /bin/sh
 
 if [ -z "$1" ]; then
-   echo "Usage: compyle [-1] file.py..."
+   echo "Usage: compyle file.py..." >&2
    exit 1
 fi
 
-TEMPLATE="from py_compile import compile; compile('"
-
-for file in "$@"; do
-   pgm=$TEMPLATE$file"')"
-   python"$PY_VER" -c   "$pgm" || exit 1
-   python"$PY_VER" -OOc "$pgm" || exit 1
-done
-
-#pgm="$HOME/lib/python/com.py"
-#python"$PY_VER" $pgm "$@" && python"$PY_VER" -O $pgm "$@"
+     python$PY_VER    -m compileall -x '\.tox/' -x '\.venv/' -x 'venv/' "$@"
+exec python$PY_VER -O -m compileall -x '\.tox/' -x '\.venv/' -x 'venv/' "$@"