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

Jarek Jarcec Cecho commented on SQOOP-2531:
-------------------------------------------

Thanks for the review [~mackrorysd], greatly appreciated!

Correct me if I'm wrong (shell scripts are really not cup of my tea), the 
{{readlink -f}} is used to get directory where the executable is physically 
located, so that we can use it to load other scripts relative to it's location. 
We have to get the physical location and not just take {{$0}} because the 
{{$0}} might be a symlink somewhere in {{/bin}} and obviously loading 
{{/bin/sqoop-evn.sh}} (or any other script) won't get us the results that we 
need.

But since we need the real physical location to load any other files, moving 
the detection of physical location to separate file won't really help because 
we still need this code to actually find file where this code would move to, 
right? Like a chicken and egg problem.

> readlink -f not supported on OS X
> ---------------------------------
>
>                 Key: SQOOP-2531
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2531
>             Project: Sqoop
>          Issue Type: Bug
>          Components: build, tools
>    Affects Versions: 1.4.6
>         Environment: OS X
>            Reporter: Stuart Williams
>              Labels: newbie, patch
>         Attachments: SQOOP-2531.patch
>
>
> Tool scripts (sqoop-*) rely on "readlink -f" to get the path to the script, 
> which is not an available readlink option on OS X.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to