Changeset 492 for trunk/confmanlib.sh.in


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/confmanlib.sh.in

    r491 r492  
    858858    done 
    859859 
    860     find ${WORK_PATH}/${newmod} -type f -not -path '*/.svn/*' -exec \ 
    861         ${sed_i_cmd} \ 
    862         "s/(Managed under )${oldmod}( module\.)$/\1${newmod}\2/" {} \; \ 
    863         || return 1 
     860    for file in $(find ${WORK_PATH}/${newmod} -type f -not -path '*/.svn/*') 
     861    do 
     862        sed_i_cmd \ 
     863            "s/(Managed under )${oldmod}( module\.)$/\1${newmod}\2/" "$file" \ 
     864            || return 1 
     865    done 
     866 
     867    for file in $(find $(conf_recipe_dir) -maxdepth 1 -type f); do 
     868        sed_i_cmd "s/^([ \t]*)${oldmod}([ \t]*)$/\1${newmod}\2/" "$file" ||  
     869        return 1 
     870    done 
    864871 
    865872    @SVN@ commit -m "Renaming ${oldmod} to ${newmod}" \ 
    866873        ${WORK_PATH}/${oldmod} ${WORK_PATH}/${REPO_CHECKPTS}/${oldmod} \ 
    867874        ${WORK_PATH}/${newmod} ${WORK_PATH}/${REPO_CHECKPTS}/${newmod} \ 
    868         || return 1 
     875        $(conf_recipe_dir) || return 1 
    869876 
    870877    return 0 
Note: See TracChangeset for help on using the changeset viewer.