Skip to content

Commit

Permalink
new update: we are relying on new links for this.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Giganticus committed Mar 2, 2024
1 parent 464bdd0 commit e1e3516
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
mod funcs;

use std::io::*;
use std::fs;
use std::path::Path;

static LINKS: &[u8] = include_bytes!("..\\links.txt");

fn main() {
if Path::new("CodeWarrior").exists() {
fs::remove_dir_all("CodeWarrior").unwrap();
}
if Path::new("Kamek").exists() {
fs::remove_dir_all("Kamek").unwrap();
}
let links = &getlinks();
for link in links {
funcs::downloadandunzip(link);
}
fs::rename("CodeWarrior-Syati", "CodeWarrior").unwrap();
fs::rename("Kamek-v1", "Kamek").unwrap();
println!("Downloaded!")
}

Expand All @@ -19,4 +29,11 @@ fn getlinks() -> Vec<String> {
res.push(line.unwrap());
}
res
}

#[test]
fn test() -> std::result::Result<(), Box<dyn std::error::Error>> {
fs::rename("CodeWarrior-Syati", "CodeWarrior")?;
fs::rename("Kamek-v1", "Kamek")?;
Ok(())
}

0 comments on commit e1e3516

Please sign in to comment.