mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
chore: use strict mode for tests/*/*.sh
REF: #15514 Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
78d2ead804
commit
8cd5969248
12
tests/fixtures/gencerts.sh
vendored
12
tests/fixtures/gencerts.sh
vendored
@ -1,15 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
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 github.com/cloudflare/cfssl/cmd/cfssljson"
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user