Commit f204836d authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Merge pull request #554 from LawnGnome/solaris-grep

Prefer ggrep for grep invocations that use GNU extensions.

Fixes ruby-build on Solaris 11.1
parents fa59fd51 2e6e100a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ usage() {

definitions() {
  local query="$1"
  ruby-build --definitions | grep -F "$query" || true
  ruby-build --definitions | $(type -p ggrep grep | head -1) -F "$query" || true
}

indent() {
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ potentially_new_packages() {
}

extract_urls() {
  grep -hoe 'http[^"]\+#[^"]\+' "$@" | sort | uniq
  $(type -p ggrep grep | head -1) -hoe 'http[^"]\+#[^"]\+' "$@" | sort | uniq
}

update() {
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ assert_output() {

assert_output_contains() {
  local expected="$1"
  echo "$output" | grep -F "$expected" >/dev/null || {
  echo "$output" | $(type -p ggrep grep | head -1) -F "$expected" >/dev/null || {
    { echo "expected output to contain $expected"
      echo "actual: $output"
    } | flunk