Remove trash
This commit is contained in:
parent
f706e8612f
commit
995d39c70b
3 changed files with 0 additions and 24 deletions
BIN
..gitignore.un~
BIN
..gitignore.un~
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
/target
|
||||
**/*.rs.bk
|
|
@ -1,22 +0,0 @@
|
|||
extern crate curl;
|
||||
|
||||
use curl::easy::Easy;
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
|
||||
// Capture output into a local `Vec`.
|
||||
fn main() {
|
||||
let mut dst = Vec::new();
|
||||
let mut easy = Easy::new();
|
||||
easy.url("http://mirrors.advancedhosters.com/archlinux/core/os/x86_64/bash-5.0.009-1-x86_64.pkg.tar.xz").unwrap();
|
||||
|
||||
let mut transfer = easy.transfer();
|
||||
transfer.write_function(|data| {
|
||||
dst.extend_from_slice(data);
|
||||
Ok(data.len())
|
||||
}).unwrap();
|
||||
transfer.perform().unwrap();
|
||||
|
||||
let mut file = std::fs::File::create("./bash.pkg.tar.xz").expect("file creation failed");
|
||||
file.write_all(&dst).expect("failed to write file");
|
||||
}
|
Loading…
Reference in a new issue