Ignore:
Timestamp:
11/11/2009 16:37:02 (3 years ago)
Author:
ccowart
Message:

Apparently doing sed_i_cmd in a variable has quoting issues and
doesn't perform as expected. I have factored the -i "" logic out
by defining a sed_i_cmd function differently on a per-OS basis.

I have also used the new sed_i_cmd idiom to solve the recipe updates on
renames issue.

Fixes #96, #98

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confmancommon.sh.in

    r491 r492  
    7676    mktemp_dir="mktemp -d -t confman" 
    7777    sed_cmd="sed -E" 
    78     sed_i_cmd="${sed_cmd} -i \"\"" 
     78    function sed_i_cmd { 
     79        ${sed_cmd} -i '' "$@" 
     80    } 
    7981    stat_cmd="stat -f" 
    8082    stat_opts="mode=%Mp%Lp owner=%Su group=%Sg" 
     
    8688    mktemp_dir="mktemp -t -d confman.XXXXXX" 
    8789    sed_cmd="sed -r" 
    88     sed_i_cmd="${sed_cmd} -i" 
     90    function sed_i_cmd { 
     91        ${sed_cmd} -i "$@" 
     92    } 
    8993    stat_cmd="stat -c" 
    9094    stat_opts="mode=%a owner=%U group=%G" 
     
    96100    mktemp_dir="mktemp -d -t confman" 
    97101    sed_cmd="sed -E" 
    98     sed_i_cmd="${sed_cmd} -i \"\"" 
     102    function sed_i_cmd { 
     103        ${sed_cmd} -i '' "$@" 
     104    } 
    99105    stat_cmd="stat -f" 
    100106    stat_opts="mode=%Mp%Lp owner=%Su group=%Sg" 
Note: See TracChangeset for help on using the changeset viewer.