1
0
mirror of https://github.com/o2sh/onefetch synced 2024-07-02 15:48:51 +00:00

rollback to static license cache

This commit is contained in:
o2sh 2019-11-05 21:30:11 +01:00
parent a2f6352864
commit 5455efeeb0
5 changed files with 0 additions and 30 deletions

3
.gitignore vendored
View File

@ -13,6 +13,3 @@
# nix result from nix-build
result
# generated license cache
resources/licenses/cache.bin.gz

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "resources/licenses/spdx"]
path = resources/licenses/spdx
url = https://github.com/spdx/license-list-data

View File

@ -1,23 +0,0 @@
extern crate askalono;
use std::fs::File;
use std::path::Path;
use askalono::Store;
const EMBEDDED_CACHE: &str = "resources/licenses/cache.bin.gz";
fn main() {
if Path::new(EMBEDDED_CACHE).exists() {
println!("cargo:warning=onefetch license cache file already exists; not re-building");
return;
}
let mut store = Store::new();
store
.load_spdx(Path::new("resources/licenses/spdx/json/details"), false)
.expect("Couldn't create a store from SPDX data. Have submodules been initialized?");
let mut cache = File::create(EMBEDDED_CACHE).unwrap();
store.to_cache(&mut cache).unwrap();
}

Binary file not shown.

@ -1 +0,0 @@
Subproject commit 5f2f40350a86e05ac332a0c62d6f6bb128dac9dc