making up for cvs export not creating empy dirs
[linux_from_scratch.git] / BOOK / chapter06 / ed-inst.xml
blob40f9a20af33fe2a4130adc82c47746c2456a73c8
1 <sect2>
2 <title>Installation of Ed</title>
4 <para>Ed isn't something you would personally use. It's installed here
5 because it can be used by the patch program if you encounter an ed-based patch
6 file. This happens rarely because diff-based patches are preferred these
7 days.</para>
9 <para>Install Ed by running the following commands:</para>
11 <para><screen><userinput>cp buf.c buf.c.backup &amp;&amp;
12 sed 's/int u/int u, sfd/' buf.c.backup | \
13 &nbsp;&nbsp;&nbsp;sed '/.*\*mktemp.*/d' | \
14 &nbsp;&nbsp;&nbsp;sed 's/.*if (mktemp.*/  sfd = mkstemp(sfn);\
15 &nbsp;&nbsp;&nbsp;if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' &gt; buf.c &amp;&amp;
16 ./configure --prefix=/usr &amp;&amp;
17 make &amp;&amp;
18 make install &amp;&amp;
19 mv /usr/bin/ed /usr/bin/red /bin</userinput></screen></para>
21 </sect2>