Skip to content

Commit

Permalink
chore: add strict mode for pkg/proxy/fixtures/gencerts.sh
Browse files Browse the repository at this point in the history
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
  • Loading branch information
fuweid committed Apr 11, 2023
1 parent 8b535df commit c78da82
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/proxy/fixtures/gencerts.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#!/bin/bash

set -euo pipefail

if ! [[ "$0" =~ "./gencerts.sh" ]]; then
echo "must be run from 'fixtures'"
exit 255
fi

if ! which cfssl; then
if ! command -v cfssl; then
echo "cfssl is not installed"
echo "use: go install -mod mod github.com/cloudflare/cfssl/cmd/cfssl"
exit 255
fi

if ! command -v cfssljson; then
echo "cfssljson is not installed"
echo "use: go install -mod mod github.com/cloudflare/cfssl/cmd/cfssljson"
exit 255
fi

Expand Down

0 comments on commit c78da82

Please sign in to comment.