Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/katyo/fetch_unroll
Simple Rust build.rs utils for fetching and unrolling .tar.gz archives
https://github.com/katyo/fetch_unroll
Last synced: 2 months ago
JSON representation
Simple Rust build.rs utils for fetching and unrolling .tar.gz archives
- Host: GitHub
- URL: https://github.com/katyo/fetch_unroll
- Owner: katyo
- Created: 2020-01-07T20:17:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T15:01:01.000Z (almost 4 years ago)
- Last Synced: 2024-08-08T18:35:40.367Z (5 months ago)
- Language: Rust
- Size: 25.4 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple fetch and unroll .tar.gz archives
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-brightgreen.svg)](https://opensource.org/licenses/Apache-2.0)
[![Crates.io Package](https://img.shields.io/crates/v/fetch_unroll.svg?style=popout)](https://crates.io/crates/fetch_unroll)
[![Docs.rs API Docs](https://docs.rs/fetch_unroll/badge.svg)](https://docs.rs/fetch_unroll)
[![Travis-CI Status](https://travis-ci.com/katyo/fetch_unroll.svg?branch=master)](https://travis-ci.com/katyo/fetch_unroll)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.
## Usage example
```rust
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();
```