xinstall error
Ryan Schmidt
ryandesign at macports.org
Sat Sep 22 04:42:28 UTC 2018
On Sep 21, 2018, at 23:30, Ryan Schmidt wrote:
> On Sep 21, 2018, at 21:46, Mark Brethen wrote:
>
>> I’m trying to install a list of files into directory:
>>
>> foreach app {reduce.app bootstrapreduce.app csl} {
>> xinstall -p -W ${cslbuilddir}/csl/${app} ${libexecdir}/csl
>> ln -s ${destroot}${applications_dir}/${name}/${app} ${libexecdir}/csl/${app}
>> }
>>
>> however I get an error:
>>
>> :error:destroot Failed to destroot reduce: xinstall usage: xinstall [-bCcpSsv] [-B suffix] [-W dir] [-f flags] [-g group] [-m mode]
>> :error:destroot [-o owner] file1 file2
>> :error:destroot xinstall [-bCcpSsv] [-B suffix] [-W dir] [-f flags] [-g group] [-m mode]
>> :error:destroot [-o owner] file1 ... fileN directory
>> :error:destroot xinstall -d [-v] [-g group] [-m mode] [-o owner] directory ...
>
> Right. You need to tell xinstall what to copy from, and where to copy to. You've only listed a single thing: ${libexecdir}/csl.
>
> The arguments "-W ${cslbuilddir}/csl/${app}" mean "change to the directory ${cslbuilddir}/csl/${app} before doing anything". I think perhaps that's not what you meant, and you just didn't mean to use "-W" and should remove it.
Also, xinstall is only for creating directories or copying individual files. If reduce.app and bootstrapreduce.app are macOS apps, then they aren't files; they're directories. To copy directories (or files), use copy.
You also need ${destroot} preceding the destination. I am presuming that the value of the variable ${libexecdir} is something like ${prefix}/libexec and does not already begin with ${destroot}.
You also transposed the source and target of the symlink command.
The fixed loop is probably:
foreach app {reduce.app bootstrapreduce.app csl} {
copy ${cslbuilddir}/csl/${app} ${destroot}${libexecdir}/csl
ln -s ${libexecdir}/csl/${app} ${destroot}${applications_dir}/${name}/${app}
}
More information about the macports-dev
mailing list