whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: add library containing the Ruby executable to the CGI path
Date Thu, 18 Jun 2020 02:06:19 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e917f3  add library containing the Ruby executable to the CGI path
2e917f3 is described below

commit 2e917f3ddd1109856c8c372d3e22a93433cc071f
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Wed Jun 17 22:05:24 2020 -0400

    add library containing the Ruby executable to the CGI path
---
 config/setupmymac | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/config/setupmymac b/config/setupmymac
index 5ac8827..4fa34cd 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -506,13 +506,19 @@ if config != File.read(HTTPD_CONF)
 end
 
 wconf_source = "#{WHIMSY}/config/whimsy.conf"
+wconf_content = File.read(wconf_source)
+if wconf_content =~ /^\s*SetEnv PATH /i
+  wconf_content[/^\s*SetEnv PATH .*/] =
+    "SetEnv PATH #{File.dirname RbConfig.ruby}:${PATH}"
+end
 wconf_target = '/private/etc/apache2/other/whimsy.conf'
 if 
   not File.exist?(wconf_target) or 
-  File.read(wconf_target) != File.read(wconf_source)
+  File.read(wconf_target) != wconf_content
 then
   sudo do
-    run 'cp', wconf_source, wconf_target
+    color "$ cp #{wconf_source} #{wconf_target}"
+    File.write wconf_target, wconf_content
   end
 
   restart_apache = true


Mime
View raw message