update bash scripts to #!/usr/bin/env bash (#1987)

* update bash shebang for better compatibility including macOS

* can't have anything after #bash
This commit is contained in:
Andrei Radulescu 2024-08-27 03:25:15 +03:00 committed by GitHub
parent 2b94e4fef7
commit 0a0912234e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 17 additions and 15 deletions

View File

@ -1,3 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
sudo openocd -f "interface/stlink.cfg" -c "transport select hla_swd" -f "target/stm32h7x.cfg" -c "init"

View File

@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash
gdb-multiarch --eval-command="target extended-remote localhost:3333"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

View File

@ -1,4 +1,5 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
OP_ROOT="$DIR/../../"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
@ -51,7 +51,7 @@ cppcheck() {
--suppress=*:*include/* --error-exitcode=2 --check-level=exhaustive \
--platform=arm32-wchar_t4 $COMMON_DEFINES --checkers-report=$CHECKLIST.tmp \
--std=c11 "$@" |& tee $OUTPUT
cat $CHECKLIST.tmp >> $CHECKLIST
rm $CHECKLIST.tmp
# cppcheck bug: some MISRA errors won't result in the error exit code,

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
rm -f /tmp/dump_bootstub
rm -f /tmp/dump_main
dfu-util -a 0 -s 0x08000000 -U /tmp/dump_bootstub

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
set -e
@ -19,7 +19,7 @@ fi
CONTINUE_PATH="/data/continue.sh"
tee $CONTINUE_PATH << EOF
#!/usr/bin/bash
#!/usr/bin/env bash
sudo abctl --set_success

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"