Re: [PEPr] +1 for File Formats::File_CAB
| From: | David Sanders | Date: | Wed, 06 Feb 2008 10:51:57 +0000 |
| Subject: | Re: [PEPr] +1 for File Formats::File_CAB | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49099@lists.php.net to get a copy of this message | ||
David Jean Louis wrote:
$ which cabextract /usr/local/bin/cabextractThis is true for any software installed locally as defined by the FHS. On my Linux machine, it was supplied by default, so it was located in /usr/bin.
You should use instead the %bin_dir% variable substitution provided by the pear installer, for example: const UNIX_COMMAND = '%bin_dir%/cabextract'; and in your package.xml: <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />Yes I know about bin_dir but it would skip my /usr/bin/cabextract installation ;) Also, bin_dir may not necessarily point to /usr/local/bin. For someone wanting to install pear without sudo access, they need to make it something like ~/pear/bin. A few people have mentioned this now so I'm wondering whether using something like "which --skip-dot --skip-tilde cabextract" might be the way to go? Anyone have any input? However I just checked the BSD version of which on my mac and it doesn't have this option...
Clean code otherwise, except for some long lines that could be wrapped for more readability IMHO.I actually forgot to address this and remembered after I'd called for votes as the PEAR CS calls for lines to be 80-85 chars long. -- David Sanders shangxiao