From e543231044b50e9de263aad01b287e3e06b0faa3 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Thu, 5 Aug 2021 09:40:03 +0100 Subject: Change to #!/usr/bin/env bash for openbsd portability any flags are now passed with set -e --- .compile.do | 3 ++- .link-executable.do | 3 ++- .link-library.do | 3 ++- .vars.rc.do | 3 ++- compile_flags.txt.do | 3 ++- configure | 2 +- default.o.do | 3 ++- libpack.so.do | 3 ++- test.do | 3 ++- test_gen.do | 3 ++- 10 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.compile.do b/.compile.do index 3f48dc4..238c93b 100755 --- a/.compile.do +++ b/.compile.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e redo-ifchange .vars.rc . ./.vars.rc exec >"$3" diff --git a/.link-executable.do b/.link-executable.do index 6b2ef81..6d9b89b 100755 --- a/.link-executable.do +++ b/.link-executable.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e redo-ifchange .vars.rc . ./.vars.rc exec >"$3" diff --git a/.link-library.do b/.link-library.do index 67ea23d..a8f4675 100755 --- a/.link-library.do +++ b/.link-library.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e redo-ifchange .vars.rc . ./.vars.rc exec >"$3" diff --git a/.vars.rc.do b/.vars.rc.do index 55e7e11..153a20c 100755 --- a/.vars.rc.do +++ b/.vars.rc.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e # Ensure variables from the config aren't set before the config is read to # avoid capturing transient state diff --git a/compile_flags.txt.do b/compile_flags.txt.do index d1788fe..c1ce1ba 100755 --- a/compile_flags.txt.do +++ b/compile_flags.txt.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e redo-ifchange .vars.rc . ./.vars.rc printf '%s\n' "${CFLAGS[@]}" "${CPPFLAGS[@]}" >"$3" diff --git a/configure b/configure index 723de9f..a4bb8d5 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash usage () { echo "Usage: $0 [-h|options...]"; } diff --git a/default.o.do b/default.o.do index 88fe853..2a21e84 100755 --- a/default.o.do +++ b/default.o.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e redo-ifchg-pipe() { tr '\n' '\0' | xargs -r0 redo-ifchange; } src=${1%.o}.c redo-ifchange .compile .parse-deps "$src" diff --git a/libpack.so.do b/libpack.so.do index 6ab78e5..68ad137 100755 --- a/libpack.so.do +++ b/libpack.so.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e objects=(common.o pack.o trace.o unpack.o ieee754b.o) redo-ifchange .link-library "${objects[@]}" . ./.link-library diff --git a/test.do b/test.do index e2798e8..eb36809 100755 --- a/test.do +++ b/test.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e objects=(common.o pack.o test.o trace.o unpack.o ieee754b.o) redo-ifchange .link-executable "${objects[@]}" . ./.link-executable diff --git a/test_gen.do b/test_gen.do index c1b6dc6..044e1c2 100755 --- a/test_gen.do +++ b/test_gen.do @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e objects=(test_gen.o) redo-ifchange .link-executable "${objects[@]}" . ./.link-executable -- cgit v1.2.3-54-g00ecf