Skip to content

Commit

Permalink
i hate my life right now
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Sep 21, 2023
1 parent 0fd7b0e commit 98fb275
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions crates/packager/src/package/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,13 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
dbg!(&bin_dir);
dbg!(&std::fs::read_dir(config.out_dir())?
.map(|res| res.map(|e| e.path()))
.collect::<Result<Vec<_>, std::io::Error>>()?
.into_iter()
.flatten());
.collect::<Result<Vec<_>, std::io::Error>>()?);
for bin in &config.binaries {
let bin_path = config.binary_path(bin);
dbg!(&bin_path);
dbg!(&std::fs::read_dir(bin_path.parent().unwrap())?
.map(|res| res.map(|e| e.path()))
.collect::<Result<Vec<_>, std::io::Error>>()?
.into_iter()
.flatten());
.collect::<Result<Vec<_>, std::io::Error>>()?);
std::fs::copy(&bin_path, bin_dir.join(&bin.filename))?;
}

Expand Down
8 changes: 2 additions & 6 deletions crates/packager/src/package/deb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,13 @@ pub fn generate_data(config: &Config, data_dir: &Path) -> crate::Result<BTreeSet
dbg!(&bin_dir);
dbg!(&std::fs::read_dir(config.out_dir())?
.map(|res| res.map(|e| e.path()))
.collect::<Result<Vec<_>, std::io::Error>>()?
.into_iter()
.flatten());
.collect::<Result<Vec<_>, std::io::Error>>()?);
for bin in config.binaries.iter() {
let bin_path = config.binary_path(bin);
dbg!(&bin_path);
dbg!(&std::fs::read_dir(bin_path.parent().unwrap())?
.map(|res| res.map(|e| e.path()))
.collect::<Result<Vec<_>, std::io::Error>>()?
.into_iter()
.flatten());
.collect::<Result<Vec<_>, std::io::Error>>()?);
std::fs::copy(&bin_path, bin_dir.join(&bin.filename))?;
}

Expand Down

0 comments on commit 98fb275

Please sign in to comment.