mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 03:25:36 +00:00
linux/kernel-manual-config: Simplify the lines.nix runCommand now that I know how to escape properly
This commit is contained in:
parent
5a9d9f4f45
commit
a36456ca25
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user