From 330127599aae8e75c233bd360b472487ce127bac Mon Sep 17 00:00:00 2001 From: MikaelUrankar Date: Thu, 14 Apr 2022 14:12:06 +0200 Subject: [PATCH 1/2] Don't assume /bin/bash is available on every system. --- build.sh | 2 +- build_sysroot/build_sysroot.sh | 2 +- build_sysroot/prepare_sysroot_src.sh | 2 +- cargo.sh | 2 +- clean_all.sh | 2 +- prepare.sh | 2 +- prepare_build.sh | 2 +- rustup.sh | 2 +- test.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 230ab7b6d42..ba48c2e41fa 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #set -x set -e diff --git a/build_sysroot/build_sysroot.sh b/build_sysroot/build_sysroot.sh index a965ca971a0..f293192a099 100755 --- a/build_sysroot/build_sysroot.sh +++ b/build_sysroot/build_sysroot.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Requires the CHANNEL env var to be set to `debug` or `release.` diff --git a/build_sysroot/prepare_sysroot_src.sh b/build_sysroot/prepare_sysroot_src.sh index 071e7ed1f85..56768bbf1d0 100755 --- a/build_sysroot/prepare_sysroot_src.sh +++ b/build_sysroot/prepare_sysroot_src.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd $(dirname "$0") diff --git a/cargo.sh b/cargo.sh index e95564dccda..16e49b20423 100755 --- a/cargo.sh +++ b/cargo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -z $CHANNEL ]; then export CHANNEL='debug' diff --git a/clean_all.sh b/clean_all.sh index a77d1486fe2..efa6454f26d 100755 --- a/clean_all.sh +++ b/clean_all.sh @@ -1,4 +1,4 @@ -#!/bin/bash --verbose +#!/usr/bin/env bash --verbose set -e rm -rf target/ build_sysroot/{sysroot/,sysroot_src/,target/,Cargo.lock} perf.data{,.old} diff --git a/prepare.sh b/prepare.sh index d39f43f5e1b..42bbc4f23b9 100755 --- a/prepare.sh +++ b/prepare.sh @@ -1,4 +1,4 @@ -#!/bin/bash --verbose +#!/usr/bin/env bash --verbose set -e source prepare_build.sh diff --git a/prepare_build.sh b/prepare_build.sh index 3896775a0b9..7bd13ef0175 100755 --- a/prepare_build.sh +++ b/prepare_build.sh @@ -1,4 +1,4 @@ -#!/bin/bash --verbose +#!/usr/bin/env bash --verbose set -e ./build_sysroot/prepare_sysroot_src.sh diff --git a/rustup.sh b/rustup.sh index 01ce5bb78be..7edb5558604 100755 --- a/rustup.sh +++ b/rustup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/test.sh b/test.sh index 1d2fbd0a24c..5c5978b0bfc 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # TODO(antoyo): rewrite to cargo-make (or just) or something like that to only rebuild the sysroot when needed? From f92779512dd3c4613a7e6d0c9eb578ba5a0ec91c Mon Sep 17 00:00:00 2001 From: Mikael Urankar Date: Fri, 15 Apr 2022 09:58:09 +0200 Subject: [PATCH 2/2] Add set -v as we can't pass command line argument with /usr/bin/env --- clean_all.sh | 3 ++- prepare.sh | 3 ++- prepare_build.sh | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/clean_all.sh b/clean_all.sh index efa6454f26d..782bd3e5058 100755 --- a/clean_all.sh +++ b/clean_all.sh @@ -1,5 +1,6 @@ -#!/usr/bin/env bash --verbose +#!/usr/bin/env bash set -e +set -v rm -rf target/ build_sysroot/{sysroot/,sysroot_src/,target/,Cargo.lock} perf.data{,.old} rm -rf regex/ simple-raytracer/ diff --git a/prepare.sh b/prepare.sh index 42bbc4f23b9..e98f24c6e12 100755 --- a/prepare.sh +++ b/prepare.sh @@ -1,5 +1,6 @@ -#!/usr/bin/env bash --verbose +#!/usr/bin/env bash set -e +set -v source prepare_build.sh diff --git a/prepare_build.sh b/prepare_build.sh index 7bd13ef0175..8194360da4b 100755 --- a/prepare_build.sh +++ b/prepare_build.sh @@ -1,4 +1,5 @@ -#!/usr/bin/env bash --verbose +#!/usr/bin/env bash set -e +set -v ./build_sysroot/prepare_sysroot_src.sh