Make scripts shellcheck-clean
No behaviour change. Explicit `cd || die` (set -e already covered it), split declare/assign for PROTOC, if-blocks instead of `A && B || C`, and array-length instead of a counter loop in count_patches. The lib.sh constants get disable=SC2034 since they are consumed by the scripts that source it, which shellcheck cannot see per-file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
27f078331d
commit
d269c07396
+3
-2
@@ -62,8 +62,9 @@ if [[ -z "$resolved" ]]; then
|
||||
step "falling back to system protoc: $(protoc --version)"
|
||||
elif [[ -d "$WORK_DIR" || -d "$UPSTREAM_DIR" ]]; then
|
||||
step "no working protoc -- installing protobuf-compiler"
|
||||
sudo apt-get update -qq && sudo apt-get install -y -qq protobuf-compiler \
|
||||
|| die "could not provide a protoc. Install DotSlash (https://dotslash-cli.com) or protobuf-compiler manually."
|
||||
if ! { sudo apt-get update -qq && sudo apt-get install -y -qq protobuf-compiler; }; then
|
||||
die "could not provide a protoc. Install DotSlash (https://dotslash-cli.com) or protobuf-compiler manually."
|
||||
fi
|
||||
step "system protoc: $(protoc --version)"
|
||||
else
|
||||
warn "no checkout yet -- protoc will be verified on first 'make apply'"
|
||||
|
||||
Reference in New Issue
Block a user