#!/bin/bash

. $(dirname ${0})/qa-include

DESC="Python byte-code files could be hardlinked if the optimized one is equal"
DESC="${DESC} to the other one."

function check() {
	for py in $(find ${BUILDROOT} -type f -name "*.py"); do
		if [ -e "${py}c" ] && [ -e "${py}o" ]; then
			if cmp -s "${py}c" "${py}o"; then
				log DEBUG "  ${py}c -> ${py}o"
				ln -f "${py}c" "${py}o"
			fi
		fi
	done
}

run

