Don't try to modify binary files
The mimetype of .pyc and .pyo files is `text/x-bytecode.python` so these get clobbered by `relocate-sdk.sk` leading to a broken python.
This commit is contained in:
parent
7d15ccb9f5
commit
7832032e01
|
@ -35,7 +35,7 @@ echo "Relocating the buildroot SDK from ${OLDPATH} to ${NEWPATH} ..."
|
|||
# Make sure file uses the right language
|
||||
export LC_ALL=C
|
||||
# Replace the old path with the new one in all text files
|
||||
grep -lr "${OLDPATH}" . | while read -r FILE ; do
|
||||
grep -Ilr "${OLDPATH}" . | while read -r FILE ; do
|
||||
if file -b --mime-type "${FILE}" | grep -q '^text/' && [ "${FILE}" != "${LOCFILE}" ]
|
||||
then
|
||||
sed -i "s|${OLDPATH}|${NEWPATH}|g" "${FILE}"
|
||||
|
|
Loading…
Reference in New Issue