diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2017-07-20 16:35:12 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-07-20 22:29:12 +0200 |
commit | f45f0c2d40e3e750d66a9b791ed9e62ac4f69a8f (patch) | |
tree | fdb23668f44b2453a719f06993527ed7172c6412 /support/misc/relocate-sdk.sh | |
parent | caa376001455c8c3ebaaa3e4de2078dc3cce8948 (diff) | |
download | buildroot-f45f0c2d40e3e750d66a9b791ed9e62ac4f69a8f.tar.gz buildroot-f45f0c2d40e3e750d66a9b791ed9e62ac4f69a8f.zip |
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>
Diffstat (limited to 'support/misc/relocate-sdk.sh')
-rwxr-xr-x | support/misc/relocate-sdk.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/support/misc/relocate-sdk.sh b/support/misc/relocate-sdk.sh index 729353a4ff..caabeaa6f6 100755 --- a/support/misc/relocate-sdk.sh +++ b/support/misc/relocate-sdk.sh @@ -35,12 +35,12 @@ 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 -while read -r FILE ; do +grep -lr "${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}" fi -done < <(grep -lr "${OLDPATH}" .) +done # At the very end, we update the location file to not break the # SDK if this script gets interruted. |