Skip to content

Commit 467c1a9

Browse files
authored
chore(scripts): use bash from path variable in shebang (#190)
1 parent 6a6d210 commit 467c1a9

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

scripts/download-oas.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -eo pipefail
33

44
ROOT_DIR=$(git rev-parse --show-toplevel)
@@ -19,7 +19,7 @@ if [[ ! ${OAS_REPO} || -d ${OAS_REPO} ]]; then
1919
fi
2020

2121
if [[ -z ${OAS_API_VERSIONS} ]]; then
22-
echo "No API version passed, using ${ROOTDIR}/api-versions-lock.json"
22+
echo "No API version passed, using ${ROOT_DIR}/api-versions-lock.json"
2323
OAS_API_VERSIONS="${ROOT_DIR}/api-versions-lock.json"
2424
fi
2525

@@ -31,15 +31,15 @@ if [[ ! ${work_dir} || -d {work_dir} ]]; then
3131
fi
3232
trap "rm -rf ${work_dir}" EXIT # Delete temp directory on exit
3333

34-
if [ -d ${ROOT_DIR}/oas ]; then
34+
if [ -d "${ROOT_DIR}/oas" ]; then
3535
echo "OAS folder found. Will be removed"
36-
rm -r ${ROOT_DIR}/oas
36+
rm -r "${ROOT_DIR}/oas"
3737
fi
3838

3939
# Move oas to root level
40-
mkdir ${ROOT_DIR}/oas
41-
cd ${work_dir}
42-
git clone ${OAS_REPO} --quiet
40+
mkdir "${ROOT_DIR}/oas"
41+
cd "${work_dir}"
42+
git clone "${OAS_REPO}" --quiet
4343

4444
for service_dir in ${work_dir}/${OAS_REPO_NAME}/services/*; do
4545

scripts/generate-sdk/generate-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script clones the SDK repo and updates it with the generated API modules
33
# Pre-requisites: Java, goimports, Go
44
set -eo pipefail

scripts/generate-sdk/languages/go.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script clones the SDK repo and updates it with the generated API modules
33
# Pre-requisites: Java, goimports, Go
44
set -eo pipefail

scripts/generate-sdk/languages/java.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script clones the SDK repo and updates it with the generated API modules
33
# Pre-requisites: Java
44
set -eo pipefail

scripts/generate-sdk/languages/python.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script clones the SDK repo and updates it with the generated API modules
33
# Pre-requisites: Java, goimports, Go
44
set -eo pipefail

scripts/project.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This script is used to manage the project, only used for installing the required tools for now
44
# Usage: ./project.sh [action]

scripts/sdk-create-pr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script pushes the generated SDK to its repo and creates a PR
33
set -eo pipefail
44

0 commit comments

Comments
 (0)