Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly improve the bash scripts #165

Merged
merged 2 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assemble.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euxo pipefail

Expand Down
18 changes: 9 additions & 9 deletions check-blobs.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#!/bin/bash
#!/usr/bin/env bash

# Checks that the blobs are up to date with the committed assembly files

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