Skip to content

Commit

Permalink
refactor: use grep -E instead of egrep (#70)
Browse files Browse the repository at this point in the history
to get rid of `egrep is obsolescent` warning.
  • Loading branch information
egriff89 authored Jan 30, 2025
1 parent b5862c1 commit 00ba8ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/asdf-plugin-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ update_plugins() {
read -r plugin_name plugin_url plugin_ref_managed < <(echo ${managed_plugin})

echo "[INFO] Updating: ${plugin_name} ${plugin_url} ${plugin_ref_managed} to HEAD"
plugin_ref_before_update="$(export_plugins | egrep "^\b${plugin_name}\b\s+" | sed -e 's/^.*\s//')"
plugin_ref_before_update="$(export_plugins | grep -E "^\b${plugin_name}\b\s+" | sed -e 's/^.*\s//')"
asdf plugin update "${plugin_name}"
plugin_ref_after_update="$(export_plugins | egrep "^\b${plugin_name}\b\s+" | sed -e 's/^.*\s//')"
plugin_ref_after_update="$(export_plugins | grep -E "^\b${plugin_name}\b\s+" | sed -e 's/^.*\s//')"

if [[ "${plugin_ref_before_update}" == "${plugin_ref_after_update}" ]]; then
echo "[INFO] The plugin \"${plugin_name}\" with git-ref \"${plugin_ref_managed}\" is already up-to-date."
Expand Down

0 comments on commit 00ba8ab

Please sign in to comment.