Skip to content

Commit d99eefa

Browse files
SorinOlarikr-t
authored andcommitted
CI(formatting-checks): use sh instead of bash to ensure compatibility (BASH_SOURCE only in bash)
Signed-off-by: SorinO <sorin.olari2@gmail.com>
1 parent 416a453 commit d99eefa

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/formatting-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
run: sh scripts/check_c_formatting.sh
3838

3939
- name: Run YAML Format Checks
40-
run: bash scripts/yml_linter.sh
40+
run: sh scripts/yml_linter.sh

scripts/check_c_formatting.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
# @copyright Copyright (c) contributors to Project Ocre,
33
# which has been established as Project Ocre a Series of LF Projects, LLC
44
#
@@ -22,7 +22,7 @@ if [ $# -eq 1 ]; then
2222
fi
2323
fi
2424

25-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
25+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
2626
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
2727
SRC_DIR="$ROOT_DIR/src"
2828

scripts/yml_linter.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
# @copyright Copyright (c) contributors to Project Ocre,
33
# which has been established as Project Ocre a Series of LF Projects, LLC
44
#
@@ -9,7 +9,7 @@
99

1010
set -e
1111

12-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
1313
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
1414

1515
echo "Checking YAML files."

0 commit comments

Comments
 (0)