Crates.io | fetch_unroll |
lib.rs | fetch_unroll |
version | 0.3.0 |
source | src |
created_at | 2020-01-07 20:50:01.451051 |
updated_at | 2021-01-07 15:34:22.434435 |
description | Simple utilities for fetching and unrolling .tar.gz archives |
homepage | |
repository | https://github.com/katyo/fetch_unroll |
max_upload_size | |
id | 196349 |
size | 25,612 |
Simple functions intended to use in Rust build.rs
scripts for tasks which related to fetching from HTTP and unrolling .tar.gz
archives with precompiled binaries and etc.
use fetch_unroll::Fetch;
let pack_url = format!(
concat!("{base}/{user}/{repo}/releases/download/",
"{package}-{version}/{package}_{target}_{profile}.tar.gz"),
base = "https://github.com",
user = "katyo",
repo = "aubio-rs",
package = "libaubio",
version = "0.5.0-alpha",
target = "armv7-linux-androideabi",
profile = "debug",
);
let dest_dir = "target/test_download";
// Fetching and unrolling archive
Fetch::from(pack_url)
.unroll().strip_components(1).to(dest_dir)
.unwrap();