diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 13:36:13 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 13:36:13 +0000 |
commit | 27b6f70a2e7556fc3012b173602d258f33cf0a7e (patch) | |
tree | 3864c5c51c9fadd6b25922d8d0aaf55bb10d29a6 /build.rs | |
parent | 437a2c87e85de43911eb04f721e0af9f3c67f4cf (diff) | |
download | subplot-27b6f70a2e7556fc3012b173602d258f33cf0a7e.tar.gz |
resource: Use a fallback path if needed
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -84,8 +84,10 @@ fn write_out_resource_file<'a>(paths: impl Iterator<Item = &'a Path>) -> Result< fn main() { println!("cargo:rerun-if-env-changed=DEB_BUILD_OPTIONS"); let paths = if std::env::var("DEB_BUILD_OPTIONS").is_err() { + println!("cargo:rustc-env=FALLBACK_PATH="); gather_share_files().expect("Unable to scan the share tree") } else { + println!("cargo:rustc-env=FALLBACK_PATH=/usr/share/subplot"); vec![] }; write_out_resource_file(paths.iter().map(PathBuf::as_path)) |