Skip to content

Commit 1329584

Browse files
committed
Fix shebangs and x bits on all scripts.
Many scripts had a #! line below the license text, where it has no effect: the kernel only looks for #! at the very start of the file. Without that, an executable script will only run successfully if the shell it's launched from contains fallback processing of some kind for when the exec system call fails. Now all bash and Python scripts have an appropriate #! at the very start, and all of them are consistently marked executable (a few were missing that as well).
1 parent 589eb00 commit 1329584

13 files changed

+26
-22
lines changed

build-clang.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
build_clang () {
2121
mkdir -p $BUILD_DIR/llvm
2222

build-common.sh

100644100755
+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0

build-compiler-rt.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
build_compilerrt () {
2121
pushToCleanDir $BUILD_DIR/compiler-rt
2222

build-misc.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
build_misc () {
2121
[ "$#" -ne 0 ] && error "misc does not support variants."
2222

build-newlib.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
build_newlib () {
2121
pushToCleanDir $BUILD_DIR/newlib
2222

build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
. $(dirname $BASH_SOURCE[0])/config.sh
2121
. $(dirname $BASH_SOURCE[0])/prepare-source.sh
2222
for E in common clang newlib compiler-rt; do

config.sh

100644100755
+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0

configure-toolchain.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
configure_toolchain() {
2121
# LLD does not have a good bare-metal builtin linker script (yet)
2222
cp "$SOURCE_ROOT_DIR/ldscript/base.ld" "$TARGET_LLVM_PATH/targets/${TARGET}/base.ld"

package-toolchain.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
package_toolchain() {
2121
echo "$VERSION_STRING" > $TARGET_LLVM_PATH/VERSION.txt
2222

prepare-source.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
prepare_source() {
2121
if [ ! -x $VENV_DIR/bin/repos.py ]; then
2222
error "Python virtualenv problem. Have you run setup.sh ?"

scripts/repos.py

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python3
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/usr/bin/env python3
19-
2020
import argparse
2121
import yaml
2222
import os

scripts/setup.py

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python3
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/usr/bin/env python3
19-
2020
from setuptools import setup, find_packages
2121
setup(
2222
name = "LLVMEmbeddedToolchainForArm",

setup.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
#
24
# Copyright (c) 2020, Arm Limited and affiliates.
35
# SPDX-License-Identifier: Apache-2.0
@@ -15,8 +17,6 @@
1517
# limitations under the License.
1618
#
1719

18-
#!/bin/bash
19-
2020
python3 -m venv venv
2121

2222
. venv/bin/activate

0 commit comments

Comments
 (0)