Changeset 463 for trunk


Ignore:
Timestamp:
10/10/2009 10:41:02 (3 years ago)
Author:
ccowart
Message:

Updated confman recipe print with no arguments to print the
host's current recipe.

Needs to be merged into 1.9.

See #85.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman.8.in

    r462 r463  
    208208.It Cm recipe  
    209209.Brq Cm get | list 
    210 .It Cm recipe  
    211 .Brq Cm create [ Fl R Ar filename ] | Cm edit | print | remove | set  
    212 .Ar recipe  
     210.It Cm recipe create Oo Fl R Ar filename Oc Ar recipe 
     211.It Cm recipe print Oo Ar recipe Oc 
     212.It Cm recipe Bro Cm edit | remove | set Brc Ar recipe  
    213213.Bl -tag -width indent 
    214214.It Cm create 
     
    222222in a text editor 
    223223.It Cm get 
    224 Print the host's current recipe 
     224Print the name of the host's current recipe 
    225225.It Cm list 
    226226List all recipes 
    227227.It Cm print 
    228228Display the contents of 
    229 .Ar recipe 
     229.Ar recipe . 
     230Defaults to the host's current recipe. 
    230231.It Cm remove 
    231232Delete  
  • trunk/confman.in

    r462 r463  
    10261026 
    10271027function recipe_print { 
    1028     if [ -z "$1" ] ; then print_usage 1 ; fi 
    10291028    local recipe="$1" 
     1029 
     1030    if [ -z "$recipe" ] ; then 
     1031        recipe=$(conf_get_recipe_name) 
     1032    fi 
     1033 
    10301034    if ! [ -f "$(conf_recipe_dir)/${recipe}" ] ; then 
    10311035        echo "Error: recipe $recipe does not exist." >&2 
    10321036        exit 1 
    10331037    fi 
     1038 
    10341039    cat "$(conf_recipe_dir)/${recipe}" 
    10351040} 
  • trunk/confmandoc.sh

    r462 r463  
    501501Usage: 
    502502  $MYNAME recipe [ get | list ] 
     503  $MYNAME recipe print [ recipe_name ] 
    503504  $MYNAME recipe [ create | edit | print | remove | set ] recipe_name 
    504505 
     
    507508    create      Create a recipe with the given name 
    508509    edit        Edit a recipe with the given name 
    509     get         Print the host's recipe 
     510    get         List the host's recipe 
    510511    list        List all recipes 
    511     print       Print the given recipe 
     512    print       Print the given recipe (defaults to this host's recipe) 
    512513    remove      Delete a recipe with the given name 
    513514    set         Set the host's recipe to the given name 
Note: See TracChangeset for help on using the changeset viewer.