[file-store-4] small refactoring
This commit is contained in:
parent
eeab207ae3
commit
97ea1b909a
|
@ -13,7 +13,7 @@ url = 'http://file-store.rosalinux.ru/api/v1/file_stores.json'
|
||||||
#url = 'http://localhost:3001/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
|
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,tar\.lzma}").uniq.sort.each do |file|
|
Dir.glob("*.{bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,xz,lzma}").uniq.sort.each do |file|
|
||||||
begin
|
begin
|
||||||
#next if File.size(file) < MAX_SIZE
|
#next if File.size(file) < MAX_SIZE
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ Dir.glob(owners).each do |owner|
|
||||||
#--
|
#--
|
||||||
Dir.chdir(path)
|
Dir.chdir(path)
|
||||||
|
|
||||||
unless `git log --all --format='%H' -- *.{tar\.bz2,tar\.gz,bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,tar\.xz,tar\.lzma}`.empty?
|
unless `git log --all --format='%H' -- *.{bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,xz,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"
|
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 !!!
|
# This is dangerous !!!
|
||||||
|
|
Loading…
Reference in New Issue