Skip to content

Commit

Permalink
Merge pull request #203589 from Homebrew/util-linux-use-bash-completi…
Browse files Browse the repository at this point in the history
…on-arg

util-linux: use `--with-bashcompletiondir` to install completions
  • Loading branch information
BrewTestBot authored Jan 8, 2025
2 parents 62d7b4a + c261d52 commit 4be3a1a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Formula/u/util-linux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class UtilLinux < Formula
end

def install
args = %w[--disable-silent-rules --disable-asciidoc]
args = %W[--disable-silent-rules --disable-asciidoc --with-bashcompletiondir=#{bash_completion}]

if OS.mac?
# Support very old ncurses used on macOS 13 and earlier
Expand All @@ -82,7 +82,6 @@ def install
args << "--disable-use-tty-group" # Fix chgrp: changing group of 'wall': Operation not permitted
args << "--disable-kill" # Conflicts with coreutils.
args << "--without-systemd" # Do not install systemd files
args << "--with-bashcompletiondir=#{bash_completion}"
args << "--disable-chfn-chsh"
args << "--disable-login"
args << "--disable-su"
Expand All @@ -92,13 +91,8 @@ def install
args << "--without-python"
end

system "./configure", *args, *std_configure_args.reject { |s| s["--disable-debug"] }
system "./configure", *args, *std_configure_args
system "make", "install"

# install completions only for installed programs
Pathname.glob("bash-completion/*") do |prog|
bash_completion.install prog if (bin/prog.basename).exist? || (sbin/prog.basename).exist?
end
end

def caveats
Expand Down

0 comments on commit 4be3a1a

Please sign in to comment.