diff --git a/bin/file-store.rb b/bin/file-store.rb index 40d04af06..390121568 100755 --- a/bin/file-store.rb +++ b/bin/file-store.rb @@ -26,7 +26,7 @@ Dir.glob("*.{bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,xz,lzma}").uniq.sort.each do |file puts " file \"#{file}\" already exists in the file-store" elsif resp == [] # try to put file at file-store - resp = JSON(rclient.post :file_store => {:file => File.new(file, 'rb')}) + resp = JSON `curl --user #{ARGF.argv[0]}: -POST -F "file_store[file]=@#{file}" http://file-store.rosalinux.ru/api/v1/upload` unless resp['sha1_hash'].nil? new_sources << " \"#{file}\": #{sha1}" FileUtils.rm_rf file