From 075b684382a2c20f0b9815519dda9ce3eeb6685c Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 10 Sep 2019 19:16:13 +0200 Subject: [PATCH 1/2] Use a more robust shebang --- assemble.sh | 2 +- check-blobs.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assemble.sh b/assemble.sh index 6a4ccdd6..497925f5 100755 --- a/assemble.sh +++ b/assemble.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euxo pipefail diff --git a/check-blobs.sh b/check-blobs.sh index 94fde420..09659452 100755 --- a/check-blobs.sh +++ b/check-blobs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Checks that the blobs are up to date with the committed assembly files From 031d4d68ff7434664e335bc67a3a59b0f3fe8ca7 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 10 Sep 2019 19:17:20 +0200 Subject: [PATCH 2/2] Address shellcheck warnings --- check-blobs.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/check-blobs.sh b/check-blobs.sh index 09659452..166b4a4c 100755 --- a/check-blobs.sh +++ b/check-blobs.sh @@ -4,18 +4,18 @@ set -euxo pipefail -for lib in $(ls bin/*.a); do - filename=$(basename $lib) - arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.before +for lib in bin/*.a; do + filename=$(basename "$lib") + arm-none-eabi-objdump -Cd "$lib" > "bin/${filename%.a}.before" done ./assemble.sh -for lib in $(ls bin/*.a); do - filename=$(basename $lib) - arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.after +for lib in bin/*.a; do + filename=$(basename "$lib") + arm-none-eabi-objdump -Cd "$lib" > "bin/${filename%.a}.after" done -for cksum in $(ls bin/*.after); do - diff -u $cksum ${cksum%.after}.before +for cksum in bin/*.after; do + diff -u "$cksum" "${cksum%.after}.before" done