Skip to content

Commit

Permalink
Revert "Add support for TeX Live package manager"
Browse files Browse the repository at this point in the history
This reverts commit b272586.
  • Loading branch information
efoerster committed Jun 9, 2019
1 parent e691d35 commit 392309a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 197 deletions.
1 change: 0 additions & 1 deletion src/distribution/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::process::Command;
mod ini;
mod miktex;
mod texlive;
mod tlpdb;

#[derive(Debug, Default, PartialEq, Eq, Clone)]
pub struct PackageManifest {
Expand Down
38 changes: 1 addition & 37 deletions src/distribution/texlive.rs
Original file line number Diff line number Diff line change
@@ -1,44 +1,8 @@
use super::tlpdb;
use super::*;
use std::fs;
use std::path::Path;

pub const DATABASE_PATH: &str = "../tlpkg/texlive.tlpdb";

pub fn read_database(file: &Path, root_dir: &Path) -> Option<Vec<PackageManifest>> {
let database = fs::read_to_string(&file).ok()?;
let (_, database) = tlpdb::parser::parse(&database).ok()?;
let packages = database
.sections
.into_iter()
.filter(|x| !x.name.starts_with("00"))
.flat_map(|x| read_manifest(&x, root_dir))
.collect();

Some(packages)
}

fn read_manifest(section: &ini::Section, root_dir: &Path) -> Option<PackageManifest> {
let name = section.name.to_owned();
let title = section.get_string_value("shortdesc")?.to_owned();
let description = section.get_array_value("longdesc").map(|x| x.join("\n"));
let doc_files = section
.get_array_value("docfiles")?
.iter()
.map(|x| root_dir.join(x))
.collect();
let run_files = section
.get_array_value("runfiles")?
.iter()
.map(|x| root_dir.join(x))
.collect();

Some(PackageManifest {
name,
title,
description,
doc_files,
run_files,
is_installed: true,
})
unimplemented!()
}
159 changes: 0 additions & 159 deletions src/distribution/tlpdb.rs

This file was deleted.

0 comments on commit 392309a

Please sign in to comment.