Skip to content

Commit

Permalink
change sed into perl
Browse files Browse the repository at this point in the history
  • Loading branch information
DilshanSenarath committed Aug 3, 2023
1 parent 6c5050d commit b47bdc9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/distribution/src/bin/fips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ while getopts "f:m:" opt; do

if grep -q "bcprov-jdk15on" "$bundles_info"; then
sever_restart_required=true
sed -i '/bcprov-jdk15on/d' $bundles_info
perl -i -ne 'print unless /bcprov-jdk15on/' $bundles_info
fi
if grep -q "bcpkix-jdk15on" "$bundles_info"; then
sever_restart_required=true
sed -i '/bcpkix-jdk15on/d' $bundles_info
perl -i -ne 'print unless /bcpkix-jdk15on/' $bundles_info
fi

if [ -e $CARBON_HOME/repository/components/lib/bc-fips*.jar ]; then
Expand Down Expand Up @@ -227,7 +227,6 @@ while getopts "f:m:" opt; do
echo "Checksum verification failed: The downloaded bc-fips-$BC_FIPS_VERSION.jar may be corrupted."
fi
elif [ ! -z "$arg1" ] && [ -z "$arg2" ]; then
echo "2 empty"
if [ ! -e $arg1/bcpkix-fips-$BCPKIX_FIPS_VERSION.jar ]; then
echo "Can not be found required bc-fips-$BC_FIPS_VERSION.jar in given file path : $arg1."
else
Expand Down

0 comments on commit b47bdc9

Please sign in to comment.