Skip to content

Commit

Permalink
productized/remove_modules.sh: fail script if module is not found in …
Browse files Browse the repository at this point in the history
…the pom
  • Loading branch information
rgdoliveira committed Feb 9, 2024
1 parent b4c671d commit 29bda25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion productized/remove_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ do
modules_list=$(echo $modules | tr "," "\n")
for module in ${modules_list}
do
if ! grep -Rq "<module>${module}</module>" ${pom} ; then
echo "Could not find module ${module} in ${pom}. Exiting script..."
exit 1
fi
echo "Removing module ${module} from ${pom}"
sed -i "/<module>${module}<\/module/d" ${pom}
sed -i "/<module>${module}<\/module>/d" ${pom}
done
done

0 comments on commit 29bda25

Please sign in to comment.