Skip to content

Commit

Permalink
Shellcheck fixes (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbley authored Dec 20, 2022
1 parent 10280ea commit 8613390
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion java/build-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion nodejs/build-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions python/build-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
6 changes: 3 additions & 3 deletions python/otel-instrument
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
/opt/otel-instrument-upstream "$@"
2 changes: 1 addition & 1 deletion ruby/build-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8613390

Please sign in to comment.