|
|
@ -2,6 +2,7 @@ use chrono::prelude::*; |
|
|
|
use chrono::Duration;
|
|
|
|
use std::io::Error;
|
|
|
|
use std::io::{stdout, Result, StdoutLock, Write};
|
|
|
|
use std::process::Stdio;
|
|
|
|
use std::process::{Command, Output};
|
|
|
|
use std::thread::sleep;
|
|
|
|
|
|
|
@ -13,7 +14,13 @@ fn main() { |
|
|
|
|
|
|
|
/// Check if kdialog exists. If not, print message and return Err()
|
|
|
|
fn check_deps() -> Result<()> {
|
|
|
|
let cmd = Command::new("sh").arg("-c").arg("kdialog").status()?;
|
|
|
|
let cmd = Command::new("sh")
|
|
|
|
.arg("-c")
|
|
|
|
.arg("kdialog")
|
|
|
|
.arg("--version")
|
|
|
|
.stdout(Stdio::null())
|
|
|
|
.stderr(Stdio::null())
|
|
|
|
.status()?;
|
|
|
|
if !cmd.success() {
|
|
|
|
println!("Could not find command 'kdialog'. Please install first, then start again");
|
|
|
|
return Err(Error::new(
|
|
|
|