summaryrefslogtreecommitdiff
path: root/libssh2-sys
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-04-08 09:47:56 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-04-08 09:48:07 -0700
commitc1e65689fe1345a818d810136f5a8ea2f2c006f7 (patch)
tree4464e8fde1ca18bc0f8d62b20c6284a56fab4902 /libssh2-sys
parentff05cf27067e2481f88105e695d3617827a07ecf (diff)
downloadssh2-rs-c1e65689fe1345a818d810136f5a8ea2f2c006f7.zip
Check out submodule if it doesn't exist in dev
Diffstat (limited to 'libssh2-sys')
-rw-r--r--libssh2-sys/build.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index 3489a21..6025703 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -17,6 +17,11 @@ fn main() {
return
}
+ if !Path::new("libssh2").exists() {
+ let _ = Command::new("git").args(&["submodule", "update", "--init"])
+ .status();
+ }
+
let mut cfg = cmake::Config::new("libssh2");
let target = env::var("TARGET").unwrap();