Skip to content

Commit e0646df

Browse files
Making changes to work with GNU sed
1 parent c2d7169 commit e0646df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layer_v3/scripts/update_layer_arn_v3.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ find ./docs ./examples -type f \( -name "*.md" -o -name "*.py" -o -name "*.yaml"
2424
echo "Processing file: $file"
2525

2626
# Use sed to replace the version number in the Lambda layer ARN
27-
# -i '': edit files in-place without creating a backup
27+
# -i: edit files in-place without creating a backup
2828
# -E: use extended regular expressions
2929
# The regex matches the layer name and replaces only the version number at the end
30-
sed -i '' -E "s/(AWSLambdaPowertoolsPythonV3-python[0-9]+-((arm64)|(x86_64)):)[0-9]+/\1$new_version/g" "$file"
30+
sed -i -E "s/(AWSLambdaPowertoolsPythonV3-python[0-9]+-((arm64)|(x86_64)):)[0-9]+/\1$new_version/g" "$file"
3131
if [ $? -eq 0 ]; then
3232
echo "Updated $file successfully"
3333
grep "arn:aws:lambda:" "$file"

0 commit comments

Comments
 (0)