diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-02-23 20:27:22 +0000 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-02-23 20:27:22 +0000 |
| commit | 1acff8916fb9dafbcbdb64a7ffd49242d1943281 (patch) | |
| tree | 846a2e1fb20116cb674efdf733b1c526e31b0d9c | |
| parent | feature(strider): Allow to Hide Hidden Files (#203) (diff) | |
| download | sl0ppij-1acff8916fb9dafbcbdb64a7ffd49242d1943281.tar.gz sl0ppij-1acff8916fb9dafbcbdb64a7ffd49242d1943281.tar.xz sl0ppij-1acff8916fb9dafbcbdb64a7ffd49242d1943281.zip | |
build(actually reinstall updated plugins)
| -rw-r--r-- | build.rs | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,5 @@ use directories_next::ProjectDirs; -use std::fs; +use std::{ffi::OsStr, fs}; use structopt::clap::Shell; use walkdir::WalkDir; @@ -24,11 +24,21 @@ fn main() { clap_app.gen_completions(BIN_NAME, Shell::Fish, &out_dir); // Clear Default Plugins and Layouts + + // Rerun on layout change for entry in WalkDir::new("assets/layouts") { let entry = entry.unwrap(); println!("cargo:rerun-if-changed={}", entry.path().to_string_lossy()); } + // Rerun on plugin change + for entry in WalkDir::new("target") { + let entry = entry.unwrap(); + if entry.path().extension() == Some(OsStr::new("wasm")) { + println!("cargo:rerun-if-changed={}", entry.path().to_string_lossy()); + } + } + let project_dirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap(); let data_dir = project_dirs.data_dir(); drop(fs::remove_file(data_dir.join("plugins/status-bar.wasm"))); |
