MissouriMRDT / Autonomy_Software

Use double quote to prevent globbing and word splitting SH-2086
Bug risk
Major
44 occurrences in this check
Double quote to prevent globbing and word splitting
35valgrind_cmd+=" $executable_path"
36
37# Run the Valgrind command
38timeout --signal=SIGINT 60s $valgrind_cmd39
40exit_code=$?
41
Double quote to prevent globbing and word splitting
17script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
18
19# Attempt to copy the suppressions files from OpenCV install to project directory.
20cp /usr/local/share/opencv*/*.supp $script_dir21
22# Find all .supp files in the same directory as the script
23supp_files=$(find "$script_dir" -maxdepth 1 -type f -name "*.supp")
Double quote to prevent globbing and word splitting
41	echo "Make sure to disconnect from the network before trying to reach the internet!"
42fi
43
44if [ $1 = "on" ] || [ $1 = "off" ]; then45	echo "Restarting network-manager"
46	service network-manager restart
47	echo "Restarting networking"
Double quote to prevent globbing and word splitting
41	echo "Make sure to disconnect from the network before trying to reach the internet!"
42fi
43
44if [ $1 = "on" ] || [ $1 = "off" ]; then45	echo "Restarting network-manager"
46	service network-manager restart
47	echo "Restarting networking"
Double quote to prevent globbing and word splitting
20	echo "" >> "${NETWORK}"
21
22	echo "Static IP has been turned ON"
23elif [ $1 = "off" ]; then24	echo "Turning Off -  Static IP"
25
26        echo "# interfaces(5) file used by ifup(8) and ifdown(8)" > "${NETWORK}"
Double quote to prevent globbing and word splitting
 2
 3NETWORK=/etc/network/interfaces
 4
 5if [ $1 = "on" ]; then 6	echo "Turning On - Static IP"
 7
 8	echo "# interfaces(5) file used by ifup(8) and ifdown(8)" > "${NETWORK}"
Double quote to prevent globbing and word splitting
 18    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
 19else
 20    echo "Package version ${TENSORFLOW_VERSION} does not exist in the repository. Building the package."
 21    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT 22
 23    # Install BAZEL build system.
 24    wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-arm64
Double quote to prevent globbing and word splitting
 15# Check if the file exists
 16if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
 17    echo "Package version ${TENSORFLOW_VERSION} already exists in the repository. Skipping build."
 18    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT 19else
 20    echo "Package version ${TENSORFLOW_VERSION} does not exist in the repository. Building the package."
 21    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
 18    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
 19else
 20    echo "Package version ${TENSORFLOW_VERSION} does not exist in the repository. Building the package."
 21    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT 22
 23    # Install BAZEL build system.
 24    curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
Double quote to prevent globbing and word splitting
 15# Check if the file exists
 16if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
 17    echo "Package version ${TENSORFLOW_VERSION} already exists in the repository. Skipping build."
 18    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT 19else
 20    echo "Package version ${TENSORFLOW_VERSION} does not exist in the repository. Building the package."
 21    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
16else
17    echo "Package version ${QUILL_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT19
20    # Delete Old Packages
21    rm -rf /tmp/pkg
Double quote to prevent globbing and word splitting
12# Check if the file exists
13if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
14    echo "Package version ${QUILL_VERSION} already exists in the repository. Skipping build."
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT16else
17    echo "Package version ${QUILL_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
16else
17    echo "Package version ${QUILL_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT19    
20    # Delete Old Packages
21    rm -rf /tmp/pkg
Double quote to prevent globbing and word splitting
12# Check if the file exists
13if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
14    echo "Package version ${QUILL_VERSION} already exists in the repository. Skipping build."
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT16else
17    echo "Package version ${QUILL_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
16    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
17else
18    echo "Package version ${TORCH_VERSION} does not exist in the repository. Building the package."
19    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT20
21    # Install dependencies.
22    apt update && apt install -y python3-numpy python-is-python3
Double quote to prevent globbing and word splitting
13# Check if the file exists
14if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
15    echo "Package version ${TORCH_VERSION} already exists in the repository. Skipping build."
16    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT17else
18    echo "Package version ${TORCH_VERSION} does not exist in the repository. Building the package."
19    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
16    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
17else
18    echo "Package version ${TORCH_VERSION} does not exist in the repository. Building the package."
19    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT20    
21    # Delete Old Packages
22    rm -rf /tmp/pkg
Double quote to prevent globbing and word splitting
13# Check if the file exists
14if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
15    echo "Package version ${TORCH_VERSION} already exists in the repository. Skipping build."
16    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT17else
18    echo "Package version ${TORCH_VERSION} does not exist in the repository. Building the package."
19    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
16else
17    echo "Package version ${OPENCV_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT19
20    # Delete Old Packages
21    rm -rf /tmp/pkg
Double quote to prevent globbing and word splitting
12# Check if the file exists
13if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
14    echo "Package version ${OPENCV_VERSION} already exists in the repository. Skipping build."
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT16else
17    echo "Package version ${OPENCV_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
16else
17    echo "Package version ${OPENCV_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT19
20    # Delete Old Packages
21    rm -rf /tmp/pkg
Double quote to prevent globbing and word splitting
12# Check if the file exists
13if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
14    echo "Package version ${OPENCV_VERSION} already exists in the repository. Skipping build."
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT16else
17    echo "Package version ${OPENCV_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
16else
17    echo "Package version ${GTEST_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT19    
20    # Delete Old Packages
21    rm -rf /tmp/pkg
Double quote to prevent globbing and word splitting
12# Check if the file exists
13if curl --output /dev/null --silent --head --fail "$FILE_URL"; then
14    echo "Package version ${GTEST_VERSION} already exists in the repository. Skipping build."
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT16else
17    echo "Package version ${GTEST_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT
Double quote to prevent globbing and word splitting
15    echo "rebuilding_pkg=false" >> $GITHUB_OUTPUT
16else
17    echo "Package version ${GTEST_VERSION} does not exist in the repository. Building the package."
18    echo "rebuilding_pkg=true" >> $GITHUB_OUTPUT19    
20    # Delete Old Packages
21    rm -rf /tmp/pkg