Skip to content

Commit

Permalink
util-linux: use --with-bashcompletiondir to install completions
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Jan 8, 2025
1 parent 052adcd commit c261d52
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 c261d52

Please sign in to comment.