Skip to content

Commit

Permalink
fix path for jar, make sed actually work on OSX
Browse files Browse the repository at this point in the history
Author: Nick Lanham <nick@afternight.org>

Closes apache#264 from nicklan/make-distribution-fixes and squashes the following commits:

172b981 [Nick Lanham] fix path for jar, make sed actually work on OSX
  • Loading branch information
nicklan authored and mateiz committed Mar 28, 2014
1 parent 60abc25 commit 75d46be
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions make-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,11 @@ if [ "$SPARK_TACHYON" == "true" ]; then
cp -r "tachyon-${TACHYON_VERSION}"/src/main/java/tachyon/web/resources "$DISTDIR/tachyon/src/main/java/tachyon/web"

if [[ `uname -a` == Darwin* ]]; then
# osx sed wants an empty argument to -i option of sed
TACHYON_SED="sed -i ''"
# need to run sed differently on osx
nl=$'\n'; sed -i "" -e "s|export TACHYON_JAR=\$TACHYON_HOME/target/\(.*\)|# This is set for spark's make-distribution\\$nl export TACHYON_JAR=\$TACHYON_HOME/../jars/\1|" "$DISTDIR/tachyon/libexec/tachyon-config.sh"
else
TACHYON_SED="sed -i"
sed -i "s|export TACHYON_JAR=\$TACHYON_HOME/target/\(.*\)|# This is set for spark's make-distribution\n export TACHYON_JAR=\$TACHYON_HOME/../jars/\1|" "$DISTDIR/tachyon/libexec/tachyon-config.sh"
fi
$TACHYON_SED -e "s|export TACHYON_JAR=\$TACHYON_HOME/target/\(.*\)|# This is set for spark's make-distribution\n export TACHYON_JAR=\$TACHYON_HOME/../../jars/\1|" "$DISTDIR/tachyon/libexec/tachyon-config.sh"

popd > /dev/null
rm -rf $TMPD
Expand Down

0 comments on commit 75d46be

Please sign in to comment.