From 82fdd74be7bc68e91e524b4fb2ab70960c334d2f Mon Sep 17 00:00:00 2001 From: slycordinator <68940237+slycordinator@users.noreply.github.com> Date: Mon, 27 Dec 2021 16:03:39 +0900 Subject: [PATCH] update setup.sh Doesn't use anything bash-specific, so it can be a /bin/sh script Added quotes to MDPATH variable, as recommended by shellcheck utility --- setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 6db08bed..00c460da 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/bin/sh set -e # Setup shell file to setup the environment on an ubuntu machine -sudo apt-get update && sudo apt-get install -y make bzip2 git python3 python3-pip wget dfu-util +sudo apt-get update && sudo apt-get install -y make bzip2 git python3 python3-pip wget dfu-util python3 -m pip install bdflib black flake8 sudo mkdir -p /build cd /build @@ -12,7 +12,7 @@ cd /build MDPATH=${GITHUB_WORKSPACE:-/build/source/} sudo mkdir -p /build/cache cd /build/cache/ -if md5sum -c $MDPATH/ci/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2.md5; then +if md5sum -c "$MDPATH"/ci/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2.md5; then echo "Good MD5 ARM" else echo "ARM MD5 Mismatch, downloading fresh" @@ -20,7 +20,7 @@ else sudo wget -q "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2" -O gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 fi -if md5sum -c $MDPATH/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md5; then +if md5sum -c "$MDPATH"/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md5; then echo "Good MD5 RISCV" else echo "RISCV MD5 Mismatch, downloading fresh"