From aede8849dbe011d2e70fc7d52c15f88cad593b03 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Fri, 12 Mar 2021 02:12:03 +0800 Subject: [PATCH] Improve Shell Script syntax (#4497) --- docs/ci.sh | 2 +- docs/upload-archive.sh | 2 +- mitmproxy/contrib/kaitaistruct/make.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ci.sh b/docs/ci.sh index 92597223b..1a9880061 100755 --- a/docs/ci.sh +++ b/docs/ci.sh @@ -10,7 +10,7 @@ set -o pipefail # Only upload if we have defined credentials - we only have these defined for # trusted commits (i.e. not PRs). -if [[ ! -z "${AWS_ACCESS_KEY_ID}" && $GITHUB_REF == "refs/heads/master" ]]; then +if [[ -n "${AWS_ACCESS_KEY_ID}" && $GITHUB_REF == "refs/heads/master" ]]; then aws s3 sync --delete --acl public-read ./public s3://docs.mitmproxy.org/master aws cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \ --paths "/master/*" diff --git a/docs/upload-archive.sh b/docs/upload-archive.sh index e35345e98..fde55ce01 100755 --- a/docs/upload-archive.sh +++ b/docs/upload-archive.sh @@ -16,7 +16,7 @@ SPATH="/archive/$1" aws configure set preview.cloudfront true aws --profile mitmproxy \ - s3 sync --acl public-read ./public s3://docs.mitmproxy.org$SPATH + s3 sync --acl public-read ./public "s3://docs.mitmproxy.org$SPATH" aws --profile mitmproxy \ cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \ --paths "$SPATH/*" diff --git a/mitmproxy/contrib/kaitaistruct/make.sh b/mitmproxy/contrib/kaitaistruct/make.sh index 0a30358aa..ab4b08446 100755 --- a/mitmproxy/contrib/kaitaistruct/make.sh +++ b/mitmproxy/contrib/kaitaistruct/make.sh @@ -10,4 +10,4 @@ wget -N https://raw.githubusercontent.com/kaitai-io/kaitai_struct_formats/master wget -N https://raw.githubusercontent.com/kaitai-io/kaitai_struct_formats/master/common/vlq_base128_le.ksy wget -N https://raw.githubusercontent.com/kaitai-io/kaitai_struct_formats/master/serialization/google_protobuf.ksy -kaitai-struct-compiler --target python --opaque-types=true *.ksy +kaitai-struct-compiler --target python --opaque-types=true ./*.ksy