Changeset 70 for confman/confman


Ignore:
Timestamp:
04/14/2006 01:29:15 (6 years ago)
Author:
ccowart
Message:

Allow shell globs on import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • confman/confman

    r69 r70  
    478478        local group=$DEFAULT_GROUP 
    479479        local comment=$DEFAULT_COMMENT 
    480         if [ -z $2 ] ; then 
    481                 print_usage 1 
    482         fi 
    483  
    484         if [ -r $2 ] ; then 
    485                 file=`abspath $2` 
     480        shift 
     481        if [ -z $1 ] ; then 
     482                print_usage 1 
     483        fi 
     484 
     485        if [ -r $1 ] ; then 
     486                file=`abspath $1` 
    486487        else 
    487488                # If we can't enter the parent directory, this will help us 
    488489                # get the info we need. 
    489                 file=`sudo abspath $2` 
    490         fi 
     490                file=`sudo abspath $1` 
     491        fi 
     492        shift 
    491493 
    492494 
     
    585587                rm $usefile 
    586588        fi 
     589 
     590        # Are there more files to import? 
     591        if [ ! -z $1 ] ; then 
     592                import $module $* 
     593        fi 
     594 
    587595} 
    588596 
Note: See TracChangeset for help on using the changeset viewer.