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

Andrei Savu commented on WHIRR-507:
-----------------------------------

A few notes:

* for consistency we should user uppercase for bash variables (e.g. this, bin, 
script etc.)
* can we check for readlink and use that command if available?
{noformat}
if hash readlink 2>/devnull; then echo "I can haz readlink"; fi
{noformat}

See the following SO question for more suggestions:
http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in

I don't like the idea of having to set a value for WHIRR_HOME. 
                
> 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
>             Fix For: 0.8.0
>
>         Attachments: whirr, whirr.noreadlink, whirr.readlink, 
> whirr_script.patch
>
>
> 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

        

Reply via email to