path normalisation in "base"
Gustaf Neumann
neumann at wu.ac.at
Wed Oct 12 02:06:29 PDT 2016
Am 11.10.16 um 16:38 schrieb René J.V. Bertin:
> On Tuesday October 11 2016 16:04:21 René J.V. Bertin wrote:
>
>> {{{
>> proc macports::normalize { filename } {
>> set nprefix [file dirname [file normalize "${macports::prefix}/foo"]]
>> return [string map {${nprefix} ${macports::prefix}} [file normalize $filename]]
>> }
>> }}}
probably, the following works:
proc macports::normalize { filename } {
set nprefix [file dirname [file normalize "${macports::prefix}/foo"]]
return [string map [list $nprefix ${macports::prefix}] [file normalize $filename]]
}
The curly braces prevent variable substitution.
-g
More information about the macports-dev
mailing list