Skip to content

Commit

Permalink
replace plist with service
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirozy authored and d12frosted committed Feb 7, 2023
1 parent 5c2de85 commit 496c1a3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 120 deletions.
29 changes: 5 additions & 24 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -117,30 +117,11 @@ def caveats
EOS
end

plist_options :manual => "emacs"

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/emacs</string>
<string>--fg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stdout.log</string>
<key>StandardErrorPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stderr.log</string>
</dict>
</plist>
EOS
service do
run [opt_bin/"emacs", "--fg-daemon"]
keep_alive true
log_path "/tmp/homebrew.mxcl.emacs-plus.stdout.log"
error_log_path "/tmp/homebrew.mxcl.emacs-plus.stderr.log"
end

test do
Expand Down
29 changes: 5 additions & 24 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -217,30 +217,11 @@ def caveats
EOS
end

plist_options :manual => "emacs"

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/emacs</string>
<string>--fg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stdout.log</string>
<key>StandardErrorPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stderr.log</string>
</dict>
</plist>
EOS
service do
run [opt_bin/"emacs", "--fg-daemon"]
keep_alive true
log_path "/tmp/homebrew.mxcl.emacs-plus.stdout.log"
error_log_path "/tmp/homebrew.mxcl.emacs-plus.stderr.log"
end

test do
Expand Down
29 changes: 5 additions & 24 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -263,30 +263,11 @@ def caveats
EOS
end

plist_options :manual => "emacs"

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/emacs</string>
<string>--fg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stdout.log</string>
<key>StandardErrorPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stderr.log</string>
</dict>
</plist>
EOS
service do
run [opt_bin/"emacs", "--fg-daemon"]
keep_alive true
log_path "/tmp/homebrew.mxcl.emacs-plus.stdout.log"
error_log_path "/tmp/homebrew.mxcl.emacs-plus.stderr.log"
end

test do
Expand Down
29 changes: 5 additions & 24 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -265,30 +265,11 @@ def caveats
EOS
end

plist_options :manual => "emacs"

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/emacs</string>
<string>--fg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stdout.log</string>
<key>StandardErrorPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stderr.log</string>
</dict>
</plist>
EOS
service do
run [opt_bin/"emacs", "--fg-daemon"]
keep_alive true
log_path "/tmp/homebrew.mxcl.emacs-plus.stdout.log"
error_log_path "/tmp/homebrew.mxcl.emacs-plus.stderr.log"
end

test do
Expand Down
29 changes: 5 additions & 24 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -265,30 +265,11 @@ def caveats
EOS
end

plist_options :manual => "emacs"

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/emacs</string>
<string>--fg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stdout.log</string>
<key>StandardErrorPath</key>
<string>/tmp/homebrew.mxcl.emacs-plus.stderr.log</string>
</dict>
</plist>
EOS
service do
run [opt_bin/"emacs", "--fg-daemon"]
keep_alive true
log_path "/tmp/homebrew.mxcl.emacs-plus.stdout.log"
error_log_path "/tmp/homebrew.mxcl.emacs-plus.stderr.log"
end

test do
Expand Down

0 comments on commit 496c1a3

Please sign in to comment.