Skip to content

Commit

Permalink
Replaces egrep with grep -E in gvm_export_path function
Browse files Browse the repository at this point in the history
`egrep` is listed as deprecated and in Fedora 38, is outputting the message "warnin: egrep is obsolescent". According to moovweb#431, the official release notes from Grep 3.8 state egrep has been deprecated since 2007.

This PR replaces `egrep` in gvm_export_path with `grep -E`.

`egrep` is mentioned in a couple of the files in `./examples/native/`, but as I don't think they're critical to the use of GVM, I have not attempted to replace them.

Fixes moovweb#431

Signed-off-by: Chris Collins <collins.christopher@gmail.com>
  • Loading branch information
clcollins committed Aug 1, 2023
1 parent 19365a6 commit 56090ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/function/gvm_export_path
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
function gvm_export_path() {
export PATH="$GVM_ROOT/bin:$(echo "$PATH" | tr ":" "\n" | "$GREP_PATH" -v '^$' | egrep -v "$GVM_ROOT/(pkgsets|gos|bin)" | tr "\n" ":" | sed 's/:*$//')"
export PATH="$GVM_ROOT/bin:$(echo "$PATH" | tr ":" "\n" | "$GREP_PATH" -v '^$' | grep -E -v "$GVM_ROOT/(pkgsets|gos|bin)" | tr "\n" ":" | sed 's/:*$//')"
export GVM_PATH_BACKUP="$PATH"
}

0 comments on commit 56090ae

Please sign in to comment.