From eeab207ae3b67871365532b350ebb8b6108e92e2 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Mon, 19 Nov 2012 15:35:22 +0600 Subject: [PATCH] [file-store-4] add lzma file support --- 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 4f3ef9aa1..8bc3c1484 100755 --- a/bin/file-store.rb +++ b/bin/file-store.rb @@ -13,7 +13,7 @@ url = 'http://file-store.rosalinux.ru/api/v1/file_stores.json' #url = 'http://localhost:3001/api/v1/file_stores.json' rclient = RestClient::Resource.new(url, :user => ARGF.argv[0]) # user auth token -Dir.glob("*.{tar\.bz2,tar\.gz,bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,tar\.xz}").uniq.sort.each do |file| +Dir.glob("*.{tar\.bz2,tar\.gz,bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,tar\.xz,tar\.lzma}").uniq.sort.each do |file| begin #next if File.size(file) < MAX_SIZE diff --git a/bin/remove_archives.rb b/bin/remove_archives.rb index 89e98fc61..e37972944 100755 --- a/bin/remove_archives.rb +++ b/bin/remove_archives.rb @@ -34,7 +34,7 @@ Dir.glob(owners).each do |owner| #-- Dir.chdir(path) - unless `git log --all --format='%H' -- *.{tar\.bz2,tar\.gz,bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,tar\.xz}`.empty? + unless `git log --all --format='%H' -- *.{tar\.bz2,tar\.gz,bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,tar\.xz,tar\.lzma}`.empty? 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 !!!