Skip to content

Commit

Permalink
Merge pull request #217 from transitland/fix-bin-setup-tmp
Browse files Browse the repository at this point in the history
Making tmp directory if not exists
  • Loading branch information
irees committed Nov 5, 2015
2 parents 263613f + df88755 commit 2542645
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ Dir.chdir APP_ROOT do
system 'cp config/sample.database.yml config/database.yml'
end

puts "\n== Removing old logs and tempfiles =="
system 'rm -f log/*'
puts "\n== Removing old tempfiles"
unless Dir.exists?('tmp')
system 'mkdir tmp'
end
system 'rm -rf tmp/cache'

puts "\n== Removing old logs =="
system 'rm -f log/*'

puts "\n== Restarting application server =="
system 'touch tmp/restart.txt'
end

0 comments on commit 2542645

Please sign in to comment.