diff --git a/.github/workflows/shfmt.yml b/.github/workflows/shfmt.yml index d81f771ab..e19b18490 100644 --- a/.github/workflows/shfmt.yml +++ b/.github/workflows/shfmt.yml @@ -4,6 +4,7 @@ on: pull_request: paths: - "**/*.sh" + - ".github/workflows/shfmt.yml" permissions: contents: read @@ -20,4 +21,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - run: shellcheck *.sh + - name: Run ShellCheck + uses: bewuethr/shellcheck-action@80bac2daa9fcf95d648200a793d00060857e6dc4 # v2.3.0 diff --git a/functions.sh b/functions.sh index 444dc2f67..2beafd5dd 100755 --- a/functions.sh +++ b/functions.sh @@ -105,7 +105,7 @@ function get_supported_arches() { lines=$(grep "${variant}" "$(dirname "${version}")"/architectures 2> /dev/null | cut -d' ' -f1) # Get version specific supported architectures if there is specialized information - if [ -a "${version}"/architectures ]; then + if [ -e "${version}"/architectures ]; then lines=$(grep "${variant}" "${version}"/architectures 2> /dev/null | cut -d' ' -f1) fi @@ -150,7 +150,7 @@ function get_versions() { fi for dir in "${dirs[@]}"; do - if [ -a "${dir}/Dockerfile" ] || [ -a "${dir}/${default_variant}/Dockerfile" ]; then + if [ -e "${dir}/Dockerfile" ] || [ -e "${dir}/${default_variant}/Dockerfile" ]; then versions+=("${dir#./}") fi done