pan3793 commented on code in PR #49891:
URL: https://github.com/apache/spark/pull/49891#discussion_r1951886878
##########
dev/make-distribution.sh:
##########
@@ -317,9 +317,9 @@ if [ "$MAKE_TGZ" == "true" ]; then
TARDIR="$SPARK_HOME/$TARDIR_NAME"
rm -rf "$TARDIR"
cp -r "$DISTDIR" "$TARDIR"
- sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\n&/' "$TARDIR/bin/pyspark"
- sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\n&/' "$TARDIR/bin/spark-shell"
- sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\n&/'
"$TARDIR/bin/spark-submit"
+ awk 'NR==1{print; print "export SPARK_CONNECT_MODE=1"; next} {print}'
"$TARDIR/bin/pyspark" > temp.txt && mv temp.txt "$TARDIR/bin/pyspark"
Review Comment:
`temp.txt`'s permission is affected by umask(typically 0022), while the
scripts `pyspark` `spark-shell` `spark-submit` should have x permission
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]