You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2014/10/31 09:12:33 UTC
[jira] [Resolved] (SPARK-4162) Make scripts symlinkable
[ https://issues.apache.org/jira/browse/SPARK-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved SPARK-4162.
------------------------------
Resolution: Duplicate
Duplicate of https://issues.apache.org/jira/browse/SPARK-3482 and https://issues.apache.org/jira/browse/SPARK-2960 Have a look at the PR for 3482 and suggest changes. This has come up several times so would be good to get it fixed.
> Make scripts symlinkable
> -------------------------
>
> Key: SPARK-4162
> URL: https://issues.apache.org/jira/browse/SPARK-4162
> Project: Spark
> Issue Type: Improvement
> Components: Deploy, EC2, Spark Shell
> Affects Versions: 1.1.0
> Environment: Mac, linux
> Reporter: Shay Seng
>
> Scripts are not symlink-able because they all use:
> FWDIR="$(cd `dirname $0`/..; pwd)"
> to detect the parent Spark dir, which doesn't take into account symlinks.
> Instead replace the above line with:
> SOURCE=$0;
> SCRIPT=`basename "$SOURCE"`;
> while [ -h "$SOURCE" ]; do
> SCRIPT=`basename "$SOURCE"`;
> LOOKUP=`ls -ld "$SOURCE"`;
> TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`;
> if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then
> SOURCE=${TARGET:-.};
> else
> SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
> fi;
> done;
> FWDIR="$(cd `dirname "$SOURCE"`/..; pwd)"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org