Ticket #21320: select-absolute-target.diff
File select-absolute-target.diff, 1.1 KB (added by jmroot (Joshua Root), 15 years ago) |
---|
-
select.sh
133 133 else 134 134 src=$(head -n ${i} ${CONFPATH}/${1} | tail -n 1) 135 135 fi 136 137 if [ "/" != $(echo ${target} | colrm 2) ]; then 138 target="${PREFIX}/${target}" 139 fi 136 140 137 141 # test if line starts with '-' -> dont link, just rm original 138 142 if [ "-" == $(echo ${src} | colrm 2) ]; then 139 143 # source is unavailable for this file 140 action "rm" "${ PREFIX}/${target}"144 action "rm" "${target}" 141 145 elif [ "/" == $(echo ${src} | colrm 2) ]; then 142 146 # source has an absolute path 143 action "ln" "${src}" "${ PREFIX}/${target}"147 action "ln" "${src}" "${target}" 144 148 else 145 149 # source has relative path 146 action "ln" "${PREFIX}/${src}" "${ PREFIX}/${target}"150 action "ln" "${PREFIX}/${src}" "${target}" 147 151 fi 148 152 let "error = error + ${?}" 149 153 let "i = i + 1"