Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Commit b23220f

Browse files
committed
[MINOR] Handle fact that mv is different on linux, mac
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. (cherry picked from commit 5a44f18) Signed-off-by: Shivaram Venkataraman <[email protected]>
1 parent 62a6577 commit b23220f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dev/make-distribution.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ if [ "$MAKE_R" == "true" ]; then
228228
# Install source package to get it to generate vignettes, etc.
229229
# Do not source the check-cran.sh - it should be run from where it is for it to set SPARK_HOME
230230
NO_TESTS=1 CLEAN_INSTALL=1 "$SPARK_HOME/"R/check-cran.sh
231-
# Move R source package to file name matching the Spark release version.
232-
mv $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz
231+
# Move R source package to match the Spark release version if the versions are not the same.
232+
# NOTE(shivaram): `mv` throws an error on Linux if source and destination are same file
233+
if [ "$R_PACKAGE_VERSION" != "$VERSION" ]; then
234+
mv $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz
235+
fi
233236
popd > /dev/null
234237
else
235238
echo "Skipping building R source package"

0 commit comments

Comments
 (0)