]> git.ipfire.org Git - people/stevee/pakfire.git/blob - tools/quality-agent.d/090-python-hardlinks
Reorder arguments when linking debugedit.
[people/stevee/pakfire.git] / tools / quality-agent.d / 090-python-hardlinks
1 #!/bin/bash
2
3 . $(dirname ${0})/qa-include
4
5 DESC="Python byte-code files could be hardlinked if the optimized one is equal"
6 DESC="${DESC} to the other one."
7
8 function check() {
9 for py in $(find ${BUILDROOT} -type f -name "*.py"); do
10 if [ -e "${py}c" ] && [ -e "${py}o" ]; then
11 if cmp -s "${py}c" "${py}o"; then
12 log DEBUG " ${py}c -> ${py}o"
13 ln -f "${py}c" "${py}o"
14 fi
15 fi
16 done
17 }
18
19 run
20