[refs #90] fix deleting old temporary git repos

This commit is contained in:
Alexander Machehin 2012-11-14 23:15:44 +06:00
parent 1007e2c476
commit 3ddef19a29
1 changed files with 2 additions and 2 deletions

View File

@ -4,8 +4,8 @@ namespace :pull_requests do
task :clear => :environment do
Dir.chdir(File.join(APP_CONFIG['git_path'], 'temp_pull_requests')) do
say "Removing repos older one day:"
say `find -mindepth 2 -maxdepth 2 -type d -mtime +0`
`find -mindepth 2 -maxdepth 2 -type d -mtime +0 | xargs rm -rf`
say `find -mindepth 3 -maxdepth 3 -type d -mtime +0`
`find -mindepth 3 -maxdepth 3 -type d -mtime +0 | xargs rm -rf`
say '-----'
say "Removing empty dir:"
say `find -maxdepth 2 -type d -empty`