Skip to content

Commit

Permalink
Use standard sed syntax for translating filenames
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Dec 2, 2024
1 parent e71ac59 commit 47326da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2094,7 +2094,9 @@ 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/"
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 47326da

Please sign in to comment.