You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "Marco Didonna (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/02/09 23:14:57 UTC

[jira] [Issue Comment Edited] (WHIRR-507) Make whirr script executable from any path

    [ https://issues.apache.org/jira/browse/WHIRR-507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204950#comment-13204950 ] 

Marco Didonna edited comment on WHIRR-507 at 2/9/12 10:14 PM:
--------------------------------------------------------------

The problem with the existing script is quite simple. If you use a simbolic link to the whirr script and you put it under, for example, /usr/bin the script doesn't work. Same thing happens if you add the whirr/bin dir to the $PATH.
The problem with the $BASH_SOURCE is that it simply it points to the directory from which the script is invoked (eg the user home directory) whereas the whirr.noreadlink follows the link in order to find the directory in which whirr and all its libraries are installed.
                
      was (Author: mdidonna):
    The problem with the existing script is quite simple. If you use a simbolic link to the whirr script and you put it under, for example, /usr/bin the script doesn't work. Same thing happens if you add the whirr/bin dir to the $PATH.
The problem with the $BASH_SOURCE is that it simply it point to the directory from which the script is invoked (eg the user home directory) whereas the whirr.noreadlink follows the link in order to find the directory in which whirr and all its libraries are installed.
                  
> Make whirr script executable from any path
> ------------------------------------------
>
>                 Key: WHIRR-507
>                 URL: https://issues.apache.org/jira/browse/WHIRR-507
>             Project: Whirr
>          Issue Type: Improvement
>    Affects Versions: 0.7.0
>         Environment: Linux (Ubuntu 11.04)
>            Reporter: Marco Didonna
>            Assignee: Marco Didonna
>            Priority: Minor
>              Labels: bash, script
>         Attachments: whirr.noreadlink, whirr.readlink
>
>
> I personally find very painful to be forced to call whirr script using its whole path. I'd prefer to add whirr script to my $PATH env variable so that I can call whirr from anywhere. I've modified the whirr script according to this purpose.
> I've created two version of the modified script:
> * one that uses the readlink command
> * one that doesn't used the former command.
> I only tested under Ubuntu 11.04 so I've no idea whether or not the readlink command is available on other distros. So please test and comment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira