[oe-commits] Matthieu Crapet : postinst_intercept script: drop pipe
git at git.openembedded.org
git at git.openembedded.org
Sun Mar 22 09:29:08 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: 7b12f4860138d8f5e53ebdfa2a87b59a9ea5c487
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=7b12f4860138d8f5e53ebdfa2a87b59a9ea5c487
Author: Matthieu Crapet <Matthieu.Crapet at ingenico.com>
Date: Wed Mar 18 17:20:20 2015 +0100
postinst_intercept script: drop pipe
Avoid useless subshell.
There's no word splitting in variable assignment.
Signed-off-by: Matthieu Crapet <Matthieu.Crapet at ingenico.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/postinst-intercepts/postinst_intercept | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept
index 27c2568..a257198 100755
--- a/scripts/postinst-intercepts/postinst_intercept
+++ b/scripts/postinst-intercepts/postinst_intercept
@@ -41,7 +41,7 @@ fi
chmod +x "$intercept_script"
-pkgs_line="$(cat $intercept_script|grep "##PKGS:")"
+pkgs_line=$(grep "##PKGS:" $intercept_script)
if [ -n "$pkgs_line" ]; then
# line exists, add this package to the list only if it's not already there
if [ -z "$(echo "$pkgs_line" | grep " $package_name ")" ]; then
More information about the Openembedded-commits
mailing list