Skip to content

Commit

Permalink
[MINOR] Handle fact that mv is different on linux, mac
Browse files Browse the repository at this point in the history
Follow up to apache@ae853e8 as `mv` throws an error on the Jenkins machines if source and destinations are the same.

Author: Shivaram Venkataraman <[email protected]>

Closes apache#16302 from shivaram/sparkr-no-mv-fix.
  • Loading branch information
shivaram committed Dec 16, 2016
1 parent 9634018 commit 5a44f18
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dev/make-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,11 @@ if [ "$MAKE_R" == "true" ]; then
# Install source package to get it to generate vignettes, etc.
# Do not source the check-cran.sh - it should be run from where it is for it to set SPARK_HOME
NO_TESTS=1 CLEAN_INSTALL=1 "$SPARK_HOME/"R/check-cran.sh
# Move R source package to file name matching the Spark release version.
mv $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz
# Move R source package to match the Spark release version if the versions are not the same.
# NOTE(shivaram): `mv` throws an error on Linux if source and destination are same file
if [ "$R_PACKAGE_VERSION" != "$VERSION" ]; then
mv $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz
fi
popd > /dev/null
else
echo "Skipping building R source package"
Expand Down

0 comments on commit 5a44f18

Please sign in to comment.