mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Langtool: Add --dry-run support
This commit is contained in:
parent
6ef855bf31
commit
3ba37f4e77
1 changed files with 8 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue