From 8613390f87a4ef73d0d0935a9c7998d5f37e8092 Mon Sep 17 00:00:00 2001 From: John Bley Date: Tue, 20 Dec 2022 14:13:06 -0500 Subject: [PATCH] Shellcheck fixes (#110) --- java/build-layer.sh | 2 +- nodejs/build-layer.sh | 2 +- python/build-layer.sh | 4 ++-- python/otel-instrument | 6 +++--- ruby/build-layer.sh | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/java/build-layer.sh b/java/build-layer.sh index 0c48546..8e4d01d 100755 --- a/java/build-layer.sh +++ b/java/build-layer.sh @@ -40,6 +40,6 @@ popd # ZIP IT echo "Creating layer ZIP" -zip -qr opentelemetry-java-wrapper.zip * +zip -qr opentelemetry-java-wrapper.zip ./* echo "Layer has been prepared"; exit 0 diff --git a/nodejs/build-layer.sh b/nodejs/build-layer.sh index 2f18e6a..8456377 100755 --- a/nodejs/build-layer.sh +++ b/nodejs/build-layer.sh @@ -38,6 +38,6 @@ find . -path "./nodejs/node_modules/pako/*" \( -name "dist" \) -type d -prune -e # ZIP IT echo "Creating layer ZIP" -zip -qr9 layer.zip * +zip -qr9 layer.zip ./* echo "Layer has been prepared"; exit 0 diff --git a/python/build-layer.sh b/python/build-layer.sh index ed74a5b..b1d670e 100755 --- a/python/build-layer.sh +++ b/python/build-layer.sh @@ -22,7 +22,7 @@ echo "Building OTel Lambda python" rm -rf build ./build.sh cd $DISTRO_DIR -docker cp `docker ps --all | grep aws-otel-lambda-python-layer | cut -d' ' -f1 | head -1`:/out/layer.zip . +docker cp "$(docker ps --all | grep aws-otel-lambda-python-layer | cut -d' ' -f1 | head -1)":/out/layer.zip . unzip -qo layer.zip && rm layer.zip mv otel-instrument otel-instrument-upstream @@ -48,6 +48,6 @@ find . -name __pycache__ -type d -prune -exec rm -rf {} \; # ZIP IT echo "Creating layer ZIP" -zip -qr layer.zip * +zip -qr layer.zip ./* echo "Layer has been prepared"; exit 0 diff --git a/python/otel-instrument b/python/otel-instrument index 8b6c680..12a6548 100755 --- a/python/otel-instrument +++ b/python/otel-instrument @@ -5,13 +5,13 @@ source /opt/splunk-default-config # temporarily, until Python supports spec exporter/protocol values if [[ $OTEL_TRACES_EXPORTER = *"otlp"* ]] then - if [ $OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = "grpc" ] + if [ "$OTEL_EXPORTER_OTLP_TRACES_PROTOCOL" = "grpc" ] then export OTEL_TRACES_EXPORTER="otlp_proto_grpc" - elif [ $OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = "http/protobuf" ] + elif [ "$OTEL_EXPORTER_OTLP_TRACES_PROTOCOL" = "http/protobuf" ] then export OTEL_TRACES_EXPORTER="otlp_proto_http" fi fi -/opt/otel-instrument-upstream $@ \ No newline at end of file +/opt/otel-instrument-upstream "$@" diff --git a/ruby/build-layer.sh b/ruby/build-layer.sh index 2ed2a8c..d912835 100755 --- a/ruby/build-layer.sh +++ b/ruby/build-layer.sh @@ -32,6 +32,6 @@ cp src/*.rb build/ruby/lib echo "Packaging dependencies into zip archive..." cd build -zip -qr9 ruby.zip * +zip -qr9 ruby.zip ./* echo "Layer has been prepared"; exit 0