]> code.ossystems Code Review - openembedded-core.git/commitdiff
postinst_intercept script: drop pipe
authorMatthieu Crapet <Matthieu.Crapet@ingenico.com>
Wed, 18 Mar 2015 16:20:20 +0000 (17:20 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 22 Mar 2015 09:20:36 +0000 (09:20 +0000)
Avoid useless subshell.
There's no word splitting in variable assignment.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/postinst-intercepts/postinst_intercept

index 27c256834ce6cde7cc8fddabfbfc5c11a7f3a877..a257198bbdbb7a547abcb6dc1e25ee01832d2c8c 100755 (executable)
@@ -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