Skip to content

Commit fa54ac1

Browse files
authored
Update utils.rs
1 parent dfe5ad9 commit fa54ac1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

hacker/src/utils.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::io::{self, Write};
44
use std::thread;
55
use std::time::Duration;
66
use std::sync::{Arc, atomic::{AtomicBool, Ordering}};
7-
87
pub fn run_command_with_spinner(program: &str, args: Vec<&str>, message: &str) {
98
println!("{}", format!("▶ {}: {}", message, args.join(" ")).blue().bold().on_black());
109
let stop = Arc::new(AtomicBool::new(false));
@@ -46,7 +45,6 @@ pub fn run_command_with_spinner(program: &str, args: Vec<&str>, message: &str) {
4645
println!("{}", format!("└──────────────────────────").red().bold().on_black());
4746
}
4847
}
49-
5048
pub fn handle_update() {
5149
println!("{}", "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓".magenta().bold().on_black());
5250
println!("{}", "┃ Starting System Update ┃".magenta().bold().on_black());
@@ -62,7 +60,6 @@ pub fn handle_update() {
6260
println!("{}", "┃ System Update Complete ┃".green().bold().on_black());
6361
println!("{}", "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛".green().bold().on_black());
6462
}
65-
6663
pub fn handle_cybersecurity() {
6764
println!("{}", "========== Setting up Cybersecurity Container ==========".cyan().bold().on_black());
6865
run_command_with_spinner("sudo", vec!["apt", "install", "-y", "distrobox"], "Installing distrobox if not present");
@@ -83,7 +80,7 @@ pub fn handle_cybersecurity() {
8380
}
8481
run_command_with_spinner("distrobox-enter", vec!["-n", "cybersecurity", "--", "sudo", "pacman", "-Syu", "--noconfirm"], "Updating system");
8582
let home = std::env::var("HOME").unwrap_or_default();
86-
let select_bin = format!("{}/.hackeros/hacker-select", home);
83+
let select_bin = format!("{}/.hackeros/hacker/hacker-select", home);
8784
let select_output = Command::new(&select_bin).arg("-mode").arg("cyber").output().expect("Failed to run hacker-select");
8885
if !select_output.status.success() {
8986
println!("{}", "Error running hacker-select".red().bold().on_black());
@@ -106,7 +103,6 @@ pub fn handle_cybersecurity() {
106103
}
107104
println!("{}", "========== Cybersecurity Setup Complete ==========".green().bold().on_black());
108105
}
109-
110106
pub fn handle_gaming() {
111107
println!("{}", "========== Installing Gaming Tools ==========".cyan().bold().on_black());
112108
run_command_with_spinner("flatpak", vec!["remote-add", "--if-not-exists", "flathub", "https://dl.flathub.org/repo/flathub.flatpakrepo"], "Adding flathub repo");

0 commit comments

Comments
 (0)