Skip to content

Commit 75d46be

Browse files
nicklanmateiz
authored andcommitted
fix path for jar, make sed actually work on OSX
Author: Nick Lanham <[email protected]> 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
1 parent 60abc25 commit 75d46be

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

make-distribution.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,11 @@ if [ "$SPARK_TACHYON" == "true" ]; then
141141
cp -r "tachyon-${TACHYON_VERSION}"/src/main/java/tachyon/web/resources "$DISTDIR/tachyon/src/main/java/tachyon/web"
142142

143143
if [[ `uname -a` == Darwin* ]]; then
144-
# osx sed wants an empty argument to -i option of sed
145-
TACHYON_SED="sed -i ''"
144+
# need to run sed differently on osx
145+
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"
146146
else
147-
TACHYON_SED="sed -i"
147+
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"
148148
fi
149-
$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"
150149

151150
popd > /dev/null
152151
rm -rf $TMPD

0 commit comments

Comments
 (0)