Shay Seng created SPARK-4162: -------------------------------- Summary: 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