aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorTill Höppner2016-03-09 18:56:15 +0100
committerTill Höppner2016-03-09 18:56:15 +0100
commita04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b (patch)
treecbe502d0287b4d40a3cee98d433973a4336ae710 /build.rs
parent58c249954e7bb8776f213248d9ca220a27c372b7 (diff)
downloadilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.tar.gz
ilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.tar.xz
ilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.zip
Mock .git for packaging purposes
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000..4915967
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,10 @@
+use std::fs::{self, File};
+use std::path::Path;
+
+fn main() {
+ let path = Path::new(".git").join("refs").join("heads").join("master");
+ if !path.exists() {
+ let _ = fs::create_dir_all(path.parent().unwrap());
+ let _ = File::create(&path);
+ }
+}