r5617 - trunk/BOOK/introduction/important

randy at linuxfromscratch.org randy at linuxfromscratch.org
Tue Jan 31 07:43:14 PST 2006


Author: randy
Date: 2006-01-31 08:43:13 -0700 (Tue, 31 Jan 2006)
New Revision: 5617

Modified:
   trunk/BOOK/introduction/important/building-notes.xml
Log:
Minor fixes to the 'Automated Building Procedures' text, thanks Bruce

Modified: trunk/BOOK/introduction/important/building-notes.xml
===================================================================
--- trunk/BOOK/introduction/important/building-notes.xml	2006-01-31 04:24:01 UTC (rev 5616)
+++ trunk/BOOK/introduction/important/building-notes.xml	2006-01-31 15:43:13 UTC (rev 5617)
@@ -173,10 +173,10 @@
 <screen><userinput>make check < ../cups-1.1.23-testsuite_parms</userinput></screen>
 
     <para>This effectively makes the test suite use the responses in the file
-    as the input to the questions. Impressive, don't you think? Occasionally
-    you may end up doing a bit of trial and error determining the exact format
-    of your input file for some things, but once figured out and documented you
-    can use this to automate building the package.</para>
+    as the input to the questions. Occasionally you may end up doing a bit of
+    trial and error determining the exact format of your input file for some
+    things, but once figured out and documented you can use this to automate
+    building the package.</para>
 
     <bridgehead renderas="sect3">Using <command>yes</command> to Automate
     Input</bridgehead>
@@ -193,10 +193,10 @@
     <para>First, create a short <application>Bash</application> script by
     entering the following commands:</para>
 
-<screen><userinput>cat > blfsyestest1 << "EOF"
+<screen><userinput>cat > blfs-yes-test1 << "EOF"
 <literal>#!/bin/bash
 
-echo -n -e \\n\\n"Please type something (or nothing) and press Enter ---> "
+echo -n -e "\n\nPlease type something (or nothing) and press Enter ---> "
 
 read A_STRING
 
@@ -204,29 +204,29 @@
 else A_STRING="You entered '$A_STRING'"
 fi
 
-echo -e \\n\\n$A_STRING\\n\\n</literal>
+echo -e "\n\n$A_STRING\n\n"</literal>
 EOF
-chmod 755 blfsyestest1</userinput></screen>
+chmod 755 blfs-yes-test1</userinput></screen>
 
-    <para>Now run the script by issuing <command>./blfsyestest1</command> from
+    <para>Now run the script by issuing <command>./blfs-yes-test1</command> from
     the command line. It will wait for a response, which can be anything (or
     nothing) followed by the <keycap>Enter</keycap> key. After entering
     something, the result will be echoed to the screen. Now use the
     <command>yes</command> command to automate the entering of a
     response:</para>
 
-<screen><userinput>yes | ./blfsyestest1</userinput></screen>
+<screen><userinput>yes | ./blfs-yes-test1</userinput></screen>
 
     <para>Notice that piping <command>yes</command> by itself to the script
     results in <keycap>y</keycap> being passed to the script. Now try it with a
     string of text:</para>
 
-<screen><userinput>yes 'This is some text' | ./blfsyestest1</userinput></screen>
+<screen><userinput>yes 'This is some text' | ./blfs-yes-test1</userinput></screen>
 
     <para>The exact string was used as the response to the script. Finally,
     try it using an empty (null) string:</para>
 
-<screen><userinput>yes '' | ./blfsyestest1</userinput></screen>
+<screen><userinput>yes '' | ./blfs-yes-test1</userinput></screen>
 
     <para>Notice this results in passing just the press of the
     <keycap>Enter</keycap> key to the script. This is useful for times when the
@@ -261,21 +261,23 @@
 <screen><userinput>ls -l /usr/bin | more > redirect_test.log 2>&1</userinput></screen>
 
     <para>Notice that this time the command immediately returned to the shell
-    prompt without having to page through the output. The last example will use
-    the <command>yes</command> command in combination with output redirection
-    to bypass having to page through the output and then providing a
-    <keycap>y</keycap> to a prompt. This technique could be used in instances
-    where otherwise you would have to page through the output of a file (such
-    as a license agreement) and then answer the question of <quote>do you
-    accept the above?</quote>. For this example, another short
-    <application>Bash</application> script is required:</para>
+    prompt without having to page through the output. You may now remove the
+    log file.</para>
 
-<screen><userinput>cat > blfsyestest2 << "EOF"
+    <para>The last example will use the <command>yes</command> command in
+    combination with output redirection to bypass having to page through the
+    output and then provide a <keycap>y</keycap> to a prompt. This technique
+    could be used in instances when otherwise you would have to page through
+    the output of a file (such as a license agreement) and then answer the
+    question of <quote>do you accept the above?</quote>. For this example,
+    another short <application>Bash</application> script is required:</para>
+
+<screen><userinput>cat > blfs-yes-test2 << "EOF"
 <literal>#!/bin/bash
 
 ls -l /usr/bin | more
 
-echo -n -e \\n\\n"Did you enjoy reading this? (y,n) "
+echo -n -e "\n\nDid you enjoy reading this? (y,n) "
 
 read A_STRING
 
@@ -283,22 +285,22 @@
 else A_STRING="You did NOT enter the 'y' key"
 fi
 
-echo -e \\n\\n$A_STRING\\n\\n</literal>
+echo -e "\n\n$A_STRING\n\n"</literal>
 EOF
-chmod 755 blfsyestest2</userinput></screen>
+chmod 755 blfs-yes-test2</userinput></screen>
 
     <para>This script can be used to simulate a program that requires you to
     read a license agreement, then respond appropriately to accept the
     agreement before the program will install anything. First, run the script
     without any automation techniques by issuing
-    <command>./blfsyestest2</command>.</para>
+    <command>./blfs-yes-test2</command>.</para>
 
     <para>Now issue the following command which uses two automation techniques,
     making it suitable for use in an automated build script:</para>
 
-<screen><userinput>yes | ./blfsyestest2 > blfsyestest2.log 2>&1</userinput></screen>
+<screen><userinput>yes | ./blfs-yes-test2 > blfs-yes-test2.log 2>&1</userinput></screen>
 
-    <para>If desired, issue <command>tail blfsyestest2.log</command> to see
+    <para>If desired, issue <command>tail blfs-yes-test2.log</command> to see
     the end of the paged output, and confirmation that <keycap>y</keycap> was
     passed through to the script. Once satisfied that it works as it should,
     you may remove the script and log file.</para>




More information about the blfs-book mailing list