You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/10/25 19:16:33 UTC

[whimsy] branch master updated: don't presume that restart.txt already exists

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 40f31c8  don't presume that restart.txt already exists
40f31c8 is described below

commit 40f31c8eb66513f5c31e7065de3b637f27637784
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Oct 25 15:16:14 2017 -0400

    don't presume that restart.txt already exists
---
 tools/toucher.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/toucher.rb b/tools/toucher.rb
index 9683477..1e7a3d7 100755
--- a/tools/toucher.rb
+++ b/tools/toucher.rb
@@ -9,9 +9,10 @@ require 'fileutils'
 
 watch = Hash.new {|hash, key| hash[key] = []}
 
-Dir["#{File.expand_path('../..', __FILE__)}/**/restart.txt"].each do |restart|
-  app = File.expand_path('../..', restart)
-  next unless File.exist? "#{app}/config.ru"
+Dir["#{File.expand_path('../..', __FILE__)}/**/config.ru"].each do |config|
+  app = File.expand_path('..', config)
+  FileUtils.mkdir_p "#{app}/tmp"
+  restart = "#{app}/tmp/restart.txt"
 
   watch[File.realpath(app)] << restart
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].