Changeset 491 for trunk/confmanlib.sh.in


Ignore:
Timestamp:
11/11/2009 15:59:06 (3 years ago)
Author:
ccowart
Message:

Defining $sed_i_cmd that deals with OS-specific logic for whether
-i must take a flag and whether it should be a separate shell word. Also
making the use of ${sed_cmd} consistent (there were some occurrences of
sed without the variable wrapper).

Fixes #98

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confmanlib.sh.in

    r477 r491  
    422422        for directory in `find -L $moduledir -mindepth 1 -type d | grep -v "\.svn"`; 
    423423    do 
    424                 local livedir=`echo $directory | sed "s:$moduledir::"` 
     424                local livedir=`echo $directory | ${sed_cmd} -e "s:$moduledir::"` 
    425425                livedir="${LIVE_ROOT}${livedir}" 
    426426                local owner=`conf_get_prop ${directory} owner` 
     
    433433        done 
    434434        for file in `find -L $moduledir -type f | grep -v "\.svn"` ; do 
    435                 local livefile=`echo "$file" | sed "s:$moduledir::"` 
     435                local livefile=`echo "$file" | ${sed_cmd} -e "s:$moduledir::"` 
    436436                local owner=`conf_get_prop ${file} owner` 
    437437                local group=`conf_get_prop ${file} group` 
     
    798798        local mode=$4 
    799799        local workdir="" 
    800         local directories=`echo "$directory" | sed 's:/: :g'` 
     800        local directories=`echo "$directory" | ${sed_cmd} -e 's:/: :g'` 
    801801        local dir 
    802802 
     
    859859 
    860860    find ${WORK_PATH}/${newmod} -type f -not -path '*/.svn/*' -exec \ 
    861         ${sed_cmd} -i"" \ 
     861        ${sed_i_cmd} \ 
    862862        "s/(Managed under )${oldmod}( module\.)$/\1${newmod}\2/" {} \; \ 
    863863        || return 1 
Note: See TracChangeset for help on using the changeset viewer.