Changeset 501 for trunk/confman.in


Ignore:
Timestamp:
11/12/2009 21:26:37 (2 years ago)
Author:
ccowart
Message:

Allowing confman recipe edit to be used with no arguments. Also
fixing the lack of error checking on existence of a recipe to be
edited.

Fixes #105

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman.in

    r499 r501  
    966966    shift $(($OPTIND - 1)) 
    967967 
    968     if [ -z "$1" ] ; then print_usage 1 ; fi 
    969  
    970     wcopy_lock=$(conf_lock_wcopy) 
    971     recipe="$1" 
     968    if [ -z "$1" ] ; then  
     969        conf_require_recipe 
     970        recipe=$(conf_get_recipe_name) 
     971    else 
     972        recipe="$1" 
     973    fi 
     974 
     975    wcopy_lock=$(conf_lock_wcopy) 
    972976    recipe_file=$(conf_recipe_dir)/${recipe} 
     977 
     978    if ! [ -f "$recipe_file" ] ; then 
     979        echo "Recipe $recipe does not exist." >&4 
     980        exit 1 
     981    fi 
     982 
    973983    new_recipe_file=$(conf_tmp_file) 
    974984 
Note: See TracChangeset for help on using the changeset viewer.