source:
vbox/trunk/src/VBox/Additions/3D/mesa/mesa-24.0.2/.gitlab-ci/run-shellcheck.sh@
105254
最後變更 在這個檔案從105254是 103996,由 提交於 12 月 前 | |
---|---|
檔案大小: 522 位元組 |
行 | |
---|---|
1 | #!/usr/bin/env bash |
2 | |
3 | CHECKPATH=".gitlab-ci" |
4 | |
5 | is_bash() { |
6 | [[ $1 == *.sh ]] && return 0 |
7 | [[ $1 == */bash-completion/* ]] && return 0 |
8 | [[ $(file -b --mime-type "$1") == text/x-shellscript ]] && return 0 |
9 | return 1 |
10 | } |
11 | |
12 | while IFS= read -r -d $'' file; do |
13 | if is_bash "$file" ; then |
14 | shellcheck -x -W0 -s bash "$file" |
15 | rc=$? |
16 | if [ "${rc}" -eq 0 ] |
17 | then |
18 | continue |
19 | else |
20 | exit 1 |
21 | fi |
22 | fi |
23 | done < <(find $CHECKPATH -type f \! -path "./.git/*" -print0) |
注意:
瀏覽 TracBrowser
來幫助您使用儲存庫瀏覽器