From a36456ca255883520fd07fa5a0b8a23bd08196a3 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 29 Jul 2012 03:09:44 -0400 Subject: [PATCH] linux/kernel-manual-config: Simplify the lines.nix runCommand now that I know how to escape properly --- pkgs/os-specific/linux/kernel/manual-config.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 83740b6285e..87550401f78 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -14,9 +14,9 @@ let lines = import "${runCommand "lines.nix" {} '' echo "[" >> $out while read line; do - if [ -n "$line" ] && [ `expr index "$line" "#"` -ne 1 ]; then - echo "${"''"}" >> $out - echo $(echo $line | sed "s@${"''"}@\$\{\"${"''"}\"}@g")"${"''"}" >> $out + if [ -n "$line" ] && [ "#" != ''${line:0:1} ]; then + echo "'''" >> $out + echo $(echo $line | sed "s/'''/''''/g")"'''" >> $out fi done < ${config} echo "]" >> $out