[ 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org