Difference between revisions of "LFScript Switches"

From LFScript
(Created page with "LFScript is a command line application. You must provide LFScript with one or more ''switches'' to control what LFScript will build. Some switches (also called 'options') requ...")
 
Line 8: Line 8:
 
If you want to give a switch multiple arguments you must enclose them in quote marks.
 
If you want to give a switch multiple arguments you must enclose them in quote marks.
  
<pre>./lfscript -Bx nano which   # WRONG!
+
<pre>./lfscript -Bx nano which     # WRONG!
./lfscript -Bx "nano which" # Right</pre>
+
./lfscript -Bx "nano which"   # Right</pre>
  
 
Every switch should be used only once per session, and not every switch will allow the use of others.
 
Every switch should be used only once per session, and not every switch will allow the use of others.
Line 17: Line 17:
 
Every time you use LFScript, you must specify a base system at least. Even if you've already build it and only want to extend or install your system, you must '''always''' specify which base system to use.
 
Every time you use LFScript, you must specify a base system at least. Even if you've already build it and only want to extend or install your system, you must '''always''' specify which base system to use.
  
=== -B ("find the base system for me") ===
+
=== -B ===
Normally, LFScript is distributed with scripts for a single base system in which case you can just
+
This will automatically select the base system for you, if only one is available.
 +
 
 +
Normally, LFScript is distributed with scripts for a single base system, making this option the easiest to use of the two 'b' options.
 +
 
 +
=== -b <basesystem> ===
 +
With this option you can specify which base system to build.
 +
 
 +
=== -k <kernel_configuration> ===
 +
Uses the specified Linux configuration file when building the kernel. If this option has not been set, LFScript will run <code>make defconfig</code> on the kernel, producing a default kernel configuration which probably lacks drivers and other support for your system. See [[Configuring a kernel]] for more information on how to create this configuration file.
 +
 
 +
Scripts named "kernel", or have the keyword "kernel" in their <code>TAGS</code> variable (see [[Script layout]]) will receive the configuration file.
 +
 
 +
LFScript has sample kernel configurations (used by the [[fsOS]] Live CD) in the "fsos" folder.
 +
 
 +
=== Examples ===
 +
<pre>./lfscript -B                            # Builds an LFS system
 +
./lfscript -b lfs-9193                  # Builds LFS SVN revision 9193 (if scripts for it exist)
 +
./lfscript -Bk fsos/3.2.1-i486.config    # Builds an LFS system and uses an fsOS kernel configuration file</pre>

Revision as of 21:27, 30 January 2012

LFScript is a command line application. You must provide LFScript with one or more switches to control what LFScript will build. Some switches (also called 'options') require additional arguments.

If you want to give several options without arguments, you can collapse them. The following two commands produce identical results:

./lfscript -B -u -x nano -k myconfig.config
./lfscript -Bux nano -k myconfig.config

If you want to give a switch multiple arguments you must enclose them in quote marks.

./lfscript -Bx nano which      # WRONG!
./lfscript -Bx "nano which"    # Right

Every switch should be used only once per session, and not every switch will allow the use of others.

Selecting the base system

Every time you use LFScript, you must specify a base system at least. Even if you've already build it and only want to extend or install your system, you must always specify which base system to use.

-B

This will automatically select the base system for you, if only one is available.

Normally, LFScript is distributed with scripts for a single base system, making this option the easiest to use of the two 'b' options.

-b <basesystem>

With this option you can specify which base system to build.

-k <kernel_configuration>

Uses the specified Linux configuration file when building the kernel. If this option has not been set, LFScript will run make defconfig on the kernel, producing a default kernel configuration which probably lacks drivers and other support for your system. See Configuring a kernel for more information on how to create this configuration file.

Scripts named "kernel", or have the keyword "kernel" in their TAGS variable (see Script layout) will receive the configuration file.

LFScript has sample kernel configurations (used by the fsOS Live CD) in the "fsos" folder.

Examples

./lfscript -B                            # Builds an LFS system
./lfscript -b lfs-9193                   # Builds LFS SVN revision 9193 (if scripts for it exist)
./lfscript -Bk fsos/3.2.1-i486.config    # Builds an LFS system and uses an fsOS kernel configuration file