From 61918bfab20eaba61bb8ce7e8397a28806d029d2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 3 Oct 2012 14:56:41 +0200 Subject: [PATCH] py-compile: Make script more robust for errors. --- tools/py-compile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/py-compile b/tools/py-compile index 5ccd8f9e6..27490426e 100755 --- a/tools/py-compile +++ b/tools/py-compile @@ -33,14 +33,18 @@ tempfile=$(mktemp) trap "rm -f ${tempfile}" EXIT cat > ${tempfile} </dev/null) # Compile with optimization. ${python_interpreter} -O ${tempfile} ${filelist} @@ -49,7 +53,7 @@ ${python_interpreter} -O ${tempfile} ${filelist} ${python_interpreter} ${tempfile} ${filelist} # Hardlink identical files. -for pyc in $(find ${paths} -type f -a -name "*.pyc"); do +for pyc in $(find ${paths} -type f -a -name "*.pyc" 2>/dev/null); do pyo="${pyc/.pyc/.pyo}" if cmp -s "${pyc}" "${pyo}"; then -- 2.39.5