Skip the Python checks if the Python files haven't changed.

This commit is contained in:
Jakob Stoklund Olesen
2017-03-31 15:45:21 -07:00
parent 9ddbc5d861
commit f70ae03b47

View File

@@ -46,8 +46,18 @@ else
echo "If a newer version of rustfmt is available, update this script." echo "If a newer version of rustfmt is available, update this script."
fi fi
# Check if any Python files have changed since we last checked them.
tsfile=$topdir/target/meta-checked
if [ -f $tsfile ]; then
needcheck=$(find $topdir/lib/cretonne/meta -name '*.py' -newer $tsfile)
else
needcheck=yes
fi
if [ -n "$needcheck" ]; then
banner $(python --version 2>&1) banner $(python --version 2>&1)
$topdir/lib/cretonne/meta/check.sh $topdir/lib/cretonne/meta/check.sh
touch $tsfile
fi
PKGS="cretonne cretonne-reader cretonne-tools filecheck" PKGS="cretonne cretonne-reader cretonne-tools filecheck"
cd "$topdir" cd "$topdir"