Skip to content

Commit

Permalink
Use standard sed syntax for translating filenames (#4072)
Browse files Browse the repository at this point in the history
* Use standard sed syntax for translating filenames

Signed-off-by: Stewart X Addison <[email protected]>

* Comment

Signed-off-by: Stewart X Addison <[email protected]>

---------

Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa authored Dec 3, 2024
1 parent ededebc commit aab0db6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,10 @@ getTargetFileNameForComponent() {
echo "${target_file_name}" | sed "s/-jdk/-${component}/"
else
# if no pattern is found, append the component name right before the extension.
echo "${target_file_name}" | sed -r "s/(.+)(\.tar\.gz|\.zip)/\1-${component}\2/"
# Stopped using -r here and split this in 2 as -r not a standard sed argument
echo "${target_file_name}" | sed \
-e "s/\(.*\)\(\.tar\.gz\)/\1-$component\2/" \
-e "s/\(.*\)\(\.zip\)/\1-${component}\2/"
fi
}

Expand Down

0 comments on commit aab0db6

Please sign in to comment.