i18n
jan Michal 2 years ago
parent 005fe8c56e
commit 976c833d01
No known key found for this signature in database
GPG Key ID: CB521D73AA05EBF2

@ -1,5 +1,6 @@
use std::io;
use std::path::Path;
use std::process::{exit, Command};
use std::{env, fs, io};
use clap::{App, AppSettings, Arg, ArgMatches, ArgSettings, Shell, SubCommand};
@ -21,6 +22,14 @@ fn main() {
crash("Running amethyst as root is disallowed as it can lead to system breakage. Instead, amethyst will prompt you when it needs superuser permissions".to_string(), 1);
}
let home = env::var("HOME").unwrap();
if !Path::exists(format!("{}/.cache/ame/", home).as_ref()) {
fs::create_dir_all(format!("{}/.cache/ame/", home)).unwrap();
} else {
fs::remove_dir_all(format!("{}/.cache/ame", home)).unwrap();
fs::create_dir_all(format!("{}/.cache/ame/", home)).unwrap();
}
fn build_app() -> App<'static, 'static> {
let app = App::new("Amethyst")
.version(env!("CARGO_PKG_VERSION"))

Loading…
Cancel
Save