mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 06:50:29 +02:00
Langtool: Add --dry-run support
This commit is contained in:
1 parent
6ef855bf31
commit
3ba37f4e77
1 file changed
+8
-2
@@ -11,6 +11,8 @@ use structopt::StructOpt;
|
||||
struct Opt {
|
||||
#[structopt(subcommand)]
|
||||
cmd: Command,
|
||||
#[structopt(short, long)]
|
||||
dry_run: bool,
|
||||
}
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
@@ -170,7 +172,9 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
target_ini.write().unwrap();
|
||||
if !opt.dry_run {
|
||||
target_ini.write().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
println!("Langtool processing {}", reference_ini_filename);
|
||||
@@ -199,5 +203,7 @@ fn main() {
|
||||
_ => {}
|
||||
}
|
||||
|
||||
// println!("{:#?}", target_ini);
|
||||
if !opt.dry_run {
|
||||
reference_ini.write().unwrap();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user