Skip to contentSkip to conversation

postinst_intercept script: drop pipe

PATCH New Matthieu Crapet 1 participant 1 message Mar 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 postinst_intercept script: drop pipe

Avoid useless subshell.
There's no word splitting in variable assignment.

---
 scripts/postinst-intercepts/postinst_intercept | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/postinst-intercepts/postinst_intercept +1 -1
index 27c2568..a257198 100755
@@ -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
Signature · 1 line
1.9.1