Created
July 21, 2014 20:59
-
-
Save rnewson/1fcf7915d998ae89e34b to your computer and use it in GitHub Desktop.
overwrite default.ini after install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Library/Formula/couchdb.rb b/Library/Formula/couchdb.rb | |
index c77e70c..258140b 100644 | |
--- a/Library/Formula/couchdb.rb | |
+++ b/Library/Formula/couchdb.rb | |
@@ -59,6 +59,25 @@ class Couchdb < Formula | |
(var+'log/couchdb').mkpath | |
end | |
+ def post_install | |
+ if new_default_ini.exist? | |
+ mv default_ini, old_default_ini | |
+ mv new_default_ini, default_ini | |
+ end | |
+ end | |
+ | |
+ def default_ini | |
+ "#{etc}/couchdb/default.ini" | |
+ end | |
+ | |
+ def new_default_ini | |
+ "#{etc}/couchdb/default.ini.default" | |
+ end | |
+ | |
+ def old_default_ini | |
+ "#{etc}/couchdb/default.ini.old" | |
+ end | |
+ | |
plist_options :manual => "couchdb" | |
def plist; <<-EOS.undent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment