Skip to contentSkip to conversation

toolchain-shar-relocate.sh: Fix handling files with colons

PATCH New Oleksiy Obitotskyy 1 participant 1 message Jan 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-shar-relocate.sh: Fix handling files with colons

Files could contain colons in name and we should not use colons (':') as field separator. E.g. perl/python man pages packages.

---
 meta/files/toolchain-shar-relocate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-relocate.sh +1 -1
index e3c10018ef..80b27b931e 100644
@@ -55,7 +55,7 @@ fi
 for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
 	$SUDO_EXEC find $replace -type f
 done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
-    awk -F':' '{printf "\"%s\"\n", $1}' | \
+    awk -F': ' '{printf "\"%s\"\n", $1}' | \
     grep -Ev "$target_sdk_dir/(environment-setup-*|relocate_sdk*|${0##*/})" | \
     xargs -n100 $SUDO_EXEC sed -i \
         -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" \
Signature · 1 line
2.26.2.Cisco