aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-06-29 19:34:45 -0600
committerMelody Horn <melody@boringcactus.com>2021-06-29 19:34:45 -0600
commit79bdc603c7654d0b951dc8938482d9d9c41e98eb (patch)
tree2d01174edd39859f90bb19284771ac0eba249b40
parent2f8db809abd2a6a8e5bc9e381e12c775ca7681d8 (diff)
downloadriir-wxwidgets-79bdc603c7654d0b951dc8938482d9d9c41e98eb.tar.gz
riir-wxwidgets-79bdc603c7654d0b951dc8938482d9d9c41e98eb.zip
fmt
-rw-r--r--src/main.rs33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 5e9a51e..ebc9d71 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,24 +8,45 @@ use clang::{Clang, Index};
const TARGET_TAG: &str = "v3.1.5";
fn main() {
- assert_eq!(current_dir().unwrap(), Path::new(env!("CARGO_MANIFEST_DIR")), "running in the wrong place");
+ assert_eq!(
+ current_dir().unwrap(),
+ Path::new(env!("CARGO_MANIFEST_DIR")),
+ "running in the wrong place"
+ );
create_dir_all("out").unwrap();
set_current_dir("out").unwrap();
if metadata("orig").is_err() {
println!("cloning wxWidgets source...");
let git_clone = Command::new("git")
- .args(&["clone", "--quiet", "https://github.com/wxWidgets/wxWidgets.git", "orig", "--depth", "1"])
+ .args(&[
+ "clone",
+ "--quiet",
+ "https://github.com/wxWidgets/wxWidgets.git",
+ "orig",
+ "--depth",
+ "1",
+ ])
.status()
.unwrap();
assert!(git_clone.success());
let git_config = Command::new("git")
- .args(&["-C", "orig", "config", "--local", "advice.detachedHead", "false"])
+ .args(&[
+ "-C",
+ "orig",
+ "config",
+ "--local",
+ "advice.detachedHead",
+ "false",
+ ])
.status()
.unwrap();
assert!(git_config.success());
}
- let git_tag = Command::new("git").args(&["-C", "orig", "describe"]).output().unwrap();
+ let git_tag = Command::new("git")
+ .args(&["-C", "orig", "describe"])
+ .output()
+ .unwrap();
if String::from_utf8(git_tag.stdout).unwrap().trim() != TARGET_TAG {
let git_checkout = Command::new("git")
.args(&["-C", "orig", "checkout", "--quiet", TARGET_TAG])
@@ -37,7 +58,9 @@ fn main() {
if metadata("new").is_err() {
println!("creating wx crate...");
let cargo_new = Command::new("cargo")
- .args(&["new", "--quiet", "--vcs", "none", "--lib", "--name", "wx", "new"])
+ .args(&[
+ "new", "--quiet", "--vcs", "none", "--lib", "--name", "wx", "new",
+ ])
.status()
.unwrap();
assert!(cargo_new.success());