summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 13:13:29 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 13:23:30 +0000
commit9977fe4a050ffbc0569ac5c3c874420cdbb3e52c (patch)
treea9e720192ec7b060bd5426a03dea33ac88ebad1c /build.rs
parent115f5897c02d26d4101658c2a34e116940d1fb6f (diff)
downloadsubplot-9977fe4a050ffbc0569ac5c3c874420cdbb3e52c.tar.gz
debian: Don't embed files for deb build
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/build.rs b/build.rs
index 3843324..8687e94 100644
--- a/build.rs
+++ b/build.rs
@@ -82,7 +82,12 @@ fn write_out_resource_file<'a>(paths: impl Iterator<Item = &'a Path>) -> Result<
}
fn main() {
- let paths = gather_share_files().expect("Unable to scan the share tree");
+ println!("cargo:rerun-if-env-changed=DEB_BUILD_OPTIONS");
+ let paths = if std::env::var("DEB_BUILD_OPTIONS").is_err() {
+ gather_share_files().expect("Unable to scan the share tree")
+ } else {
+ vec![]
+ };
write_out_resource_file(paths.iter().map(PathBuf::as_path))
.expect("Unable to write the resource file out");
}