diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c2eb387b..36ddc3741 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,3 +75,17 @@ jobs: - name: Test names by checking typo if: ${{ startsWith(matrix.os, 'ubuntu-') }} uses: crate-ci/typos@v1.12.12 + + shellcheck: + runs-on: ubuntu-20.04 + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Install ShellCheck + run: | + sudo apt-get update + sudo apt-get install -y shellcheck + + - name: Check shell files + run: git ls-files | grep -E '\.(ba)?sh' | xargs shellcheck diff --git a/build_util/create_venv_and_generate_licenses.bash b/build_util/create_venv_and_generate_licenses.bash index 29f8af57b..58af05e29 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/build_util/create_venv_and_generate_licenses.bash @@ -11,10 +11,10 @@ VENV_PATH="licenses_venv" python -m venv $VENV_PATH if [ -d "$VENV_PATH/Scripts" ]; then - # shellcheck disable=SC1091 + # shellcheck disable=SC1091,SC1090 source $VENV_PATH/Scripts/activate else - # shellcheck disable=SC1091 + # shellcheck disable=SC1091,SC1090 source $VENV_PATH/bin/activate fi diff --git a/build_util/process_voicevox_resource.bash b/build_util/process_voicevox_resource.bash index 410ca1b7e..ebcce0472 100644 --- a/build_util/process_voicevox_resource.bash +++ b/build_util/process_voicevox_resource.bash @@ -22,6 +22,8 @@ python build_util/merge_update_infos.py \ "${DOWNLOAD_RESOURCE_PATH}/engine/engine_manifest_assets/update_infos.json" \ engine_manifest_assets/update_infos.json -for f in $(ls "${DOWNLOAD_RESOURCE_PATH}"/engine/engine_manifest_assets/* | grep -v update_infos.json); do - cp "${f}" ./engine_manifest_assets/ +for f in "${DOWNLOAD_RESOURCE_PATH}"/engine/engine_manifest_assets/*; do + if [ "$(basename "${f}")" != "update_infos.json" ]; then + cp "${f}" ./engine_manifest_assets/ + fi done