mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-25 20:26:34 +00:00
support/scripts: relocate-sdk.sh now uses a normal pipe to find strings
The normal shell does not support the bashism "< <(...)". Therefore we use a normal pipe to find files containing a specific string. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
caa3760014
commit
f45f0c2d40
@ -35,12 +35,12 @@ echo "Relocating the buildroot SDK from ${OLDPATH} to ${NEWPATH} ..."
|
|||||||
# Make sure file uses the right language
|
# Make sure file uses the right language
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
# Replace the old path with the new one in all text files
|
# Replace the old path with the new one in all text files
|
||||||
while read -r FILE ; do
|
grep -lr "${OLDPATH}" . | while read -r FILE ; do
|
||||||
if file -b --mime-type "${FILE}" | grep -q '^text/' && [ "${FILE}" != "${LOCFILE}" ]
|
if file -b --mime-type "${FILE}" | grep -q '^text/' && [ "${FILE}" != "${LOCFILE}" ]
|
||||||
then
|
then
|
||||||
sed -i "s|${OLDPATH}|${NEWPATH}|g" "${FILE}"
|
sed -i "s|${OLDPATH}|${NEWPATH}|g" "${FILE}"
|
||||||
fi
|
fi
|
||||||
done < <(grep -lr "${OLDPATH}" .)
|
done
|
||||||
|
|
||||||
# At the very end, we update the location file to not break the
|
# At the very end, we update the location file to not break the
|
||||||
# SDK if this script gets interruted.
|
# SDK if this script gets interruted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user