Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions brew-pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def pkg

abort unpack_usage if ARGV.empty?
identifier_prefix = if ARGV.include? '--identifier-prefix'
ARGV.next.chomp(".")
ARGV[ARGV.index('--identifier-prefix') + 1].chomp(".")
else
'org.homebrew'
end
Expand Down Expand Up @@ -90,7 +90,7 @@ def pkg
end

# Write out a LaunchDaemon plist if we have one
if formula.plist
if formula.plist or formula.service
ohai "Plist found at #{formula.plist_name}, staging for /Library/LaunchDaemons/#{formula.plist_name}.plist"
launch_daemon_dir = File.join staging_root, "Library", "LaunchDaemons"
FileUtils.mkdir_p launch_daemon_dir
Expand All @@ -103,7 +103,7 @@ def pkg
# Add scripts if we specified --scripts
found_scripts = false
if ARGV.include? '--scripts'
scripts_path = ARGV.next
scripts_path = ARGV[ARGV.index('--scripts') + 1]
if File.directory?(scripts_path)
pre = File.join(scripts_path,"preinstall")
post = File.join(scripts_path,"postinstall")
Expand All @@ -126,7 +126,7 @@ def pkg
# Custom ownership
found_ownership = false
if ARGV.include? '--ownership'
custom_ownership = ARGV.next
custom_ownership = ARGV[ARGV.index('--ownership') + 1]
if ['recommended', 'preserve', 'preserve-other'].include? custom_ownership
found_ownership = true
ohai "Setting pkgbuild option --ownership with value #{custom_ownership}"
Expand Down