Skip to content

Commit efd9ef9

Browse files
huangxiaopingRDsrowen
authored andcommitted
[SPARK-40735] Consistently invoke bash with /usr/bin/env bash in scripts to make code more portable
### What changes were proposed in this pull request? Consistently invoke bash with /usr/bin/env bash in scripts to make code more portable ### Why are the changes needed? some bash still use #!/bin/bash ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? no need test Closes apache#38191 from huangxiaopingRD/script. Authored-by: huangxiaoping <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent 8e31554 commit efd9ef9

File tree

17 files changed

+18
-16
lines changed

17 files changed

+18
-16
lines changed

R/check-cran.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

R/create-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

R/create-rd.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

R/find-r.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

R/install-dev.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

R/install-source-package.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

R/run-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

bin/sparkR

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

binder/postBuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

connector/connect/dev/generate_protos.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
#
24
# Licensed to the Apache Software Foundation (ASF) under one or more
35
# contributor license agreements. See the NOTICE file distributed with

connector/docker/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

connector/docker/spark-test/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

connector/docker/spark-test/master/default_cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

connector/docker/spark-test/worker/default_cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

core/src/test/scala/org/apache/spark/util/UtilsSuite.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ class UtilsSuite extends SparkFunSuite with ResetSystemProperties {
10231023
file.deleteOnExit()
10241024
val cmd =
10251025
s"""
1026-
|#!/bin/bash
1026+
|#!/usr/bin/env bash
10271027
|trap "" SIGTERM
10281028
|sleep 10
10291029
""".stripMargin

resource-managers/kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Licensed to the Apache Software Foundation (ASF) under one or more
44
# contributor license agreements. See the NOTICE file distributed with

sql/create-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more

0 commit comments

Comments
 (0)