linux/kernel-manual-config: Simplify the lines.nix runCommand now that I know how to escape properly

This commit is contained in:
Shea Levy 2012-07-29 03:09:44 -04:00
parent 5a9d9f4f45
commit a36456ca25

View file

@ -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