From 53eda3fbf753cbc25a976bf52212ff5c5e9e49f6 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 14 Nov 2012 00:06:49 +0600 Subject: [PATCH] [file-store-4] small script changes --- bin/file-store.rb | 2 +- bin/remove_archives.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/file-store.rb b/bin/file-store.rb index 41634ae8d..4f3ef9aa1 100755 --- a/bin/file-store.rb +++ b/bin/file-store.rb @@ -43,7 +43,7 @@ Dir.glob("*.{tar\.bz2,tar\.gz,bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,tar\.xz}").uniq.s end end sources = (old_sources | new_sources) -unless sources.empty? +unless new_sources.empty? File.open(abf_yml, 'w') do |abf| abf.puts 'sources:' (old_sources | new_sources).sort.each {|line| abf.puts line} diff --git a/bin/remove_archives.rb b/bin/remove_archives.rb index e04c633a6..1bfa40322 100755 --- a/bin/remove_archives.rb +++ b/bin/remove_archives.rb @@ -39,7 +39,7 @@ Dir.glob(owners).each do |owner| end if archives_exists - system "git filter-branch -d /dev/shm/git_task --tree-filter \"/home/rosa/git_task/file-store.rb #{token} #{path}\" --prune-empty --tag-name-filter cat -- --all" + system "git filter-branch -d /dev/shm/git_task --tree-filter \"/home/rosa/git_task/file-store.rb #{token}\" --prune-empty --tag-name-filter cat -- --all" ##### # This is dangerous !!! system "rm -rf #{dest_project_path} && git clone --bare #{path} #{dest_project_path}"