Changeset 419


Ignore:
Timestamp:
09/21/2009 15:32:13 (3 years ago)
Author:
ccowart
Message:

The existing `confman ln' feature was buggy. This corrects a problem
where the target of symlinks was detected incorrectly.

See #51, where we are currently tracking testing and polishing for this
feature's inclusion in 2.0.

This commit will need to be merged to the 1.9 branch.

Thanks: Matthew Ekstrand-Abueg <mattea@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confmanlib.sh.in

    r417 r419  
    500500    local link=$2 
    501501    local forced=$3 
    502     local opts isdir 
    503     local WD=`pwd` 
     502    local opts isdir linkdir 
    504503 
    505504    if [ "$forced" == "true" ] ; then 
     
    520519    target=`${readlink_cmd} -m $target` 
    521520    target=${target/$ABS_WORK\//} 
    522     WD="${WD/$ABS_WORK\//}/" 
    523521    link=`${readlink_cmd} -m $link` 
    524  
    525     while [[ ${WD} =~ "^.+/" ]]; do 
     522    linkdir="${link/$ABS_WORK\//}/" 
     523 
     524    while [[ ${linkdir} =~ ^.+/ ]]; do 
    526525        target="../$target" 
    527         WD=${WD#*/} 
     526        linkdir=${linkdir#*/} 
    528527    done 
    529528 
Note: See TracChangeset for help on using the changeset viewer.