diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-05-20 00:10:38 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-05-20 00:10:38 +0100 |
commit | 3ccc6c1954852e688b34fdfd03004811fd0f2ce4 (patch) | |
tree | 435aefd6a9301e96138ad48e820c68240939bb11 /src | |
parent | e762e23a9ac7b36c6abfc8c45d1b48407263007f (diff) | |
download | subplot-3ccc6c1954852e688b34fdfd03004811fd0f2ce4.tar.gz |
bins: Switch to SUBPLOT_PLEASE=1 for separate binaries
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/sp-codegen.rs | 10 | ||||
-rw-r--r-- | src/bin/sp-docgen.rs | 10 | ||||
-rw-r--r-- | src/bin/sp-extract.rs | 10 | ||||
-rw-r--r-- | src/bin/sp-meta.rs | 10 |
4 files changed, 32 insertions, 8 deletions
diff --git a/src/bin/sp-codegen.rs b/src/bin/sp-codegen.rs index fae84af..8b32b16 100644 --- a/src/bin/sp-codegen.rs +++ b/src/bin/sp-codegen.rs @@ -9,9 +9,15 @@ use subplot::{generate_test_program, resource, template_spec, Style, SubplotErro mod cli; fn main() -> Result<()> { + match std::env::var("SUBPLOT_PLEASE") { + Ok(s) if s == "1" => {} + _ => { + eprintln!("error: Use of `sp-codegen` is deprecated."); + eprintln!("error: You should use `subplot codegen` instead."); + std::process::exit(1); + } + } let opt = Opt::from_args(); - eprintln!("warning: Use of `sp-codegen` is deprecated."); - eprintln!("warning: You should use `subplot codegen` instead."); opt.resources.handle(opt.filename.parent()); let mut doc = cli::load_document(&opt.filename, Style::default())?; diff --git a/src/bin/sp-docgen.rs b/src/bin/sp-docgen.rs index 398f126..cdedbfd 100644 --- a/src/bin/sp-docgen.rs +++ b/src/bin/sp-docgen.rs @@ -33,9 +33,15 @@ struct Opt { } fn main() -> Result<()> { + match std::env::var("SUBPLOT_PLEASE") { + Ok(s) if s == "1" => {} + _ => { + eprintln!("error: Use of `sp-codegen` is deprecated."); + eprintln!("error: You should use `subplot codegen` instead."); + std::process::exit(1); + } + } let opt = Opt::from_args(); - eprintln!("warning: Use of `sp-docgen` is deprecated."); - eprintln!("warning: You should use `subplot docgen` instead."); opt.resources.handle( opt.filenames diff --git a/src/bin/sp-extract.rs b/src/bin/sp-extract.rs index a12bbf1..05a7037 100644 --- a/src/bin/sp-extract.rs +++ b/src/bin/sp-extract.rs @@ -25,9 +25,15 @@ struct Opt { } fn main() -> Result<()> { + match std::env::var("SUBPLOT_PLEASE") { + Ok(s) if s == "1" => {} + _ => { + eprintln!("error: Use of `sp-codegen` is deprecated."); + eprintln!("error: You should use `subplot codegen` instead."); + std::process::exit(1); + } + } let opt = Opt::from_args(); - eprintln!("warning: Use of `sp-extract` is deprecated."); - eprintln!("warning: You should use `subplot extract` instead."); let doc = cli::load_document(&opt.filename, Style::default())?; diff --git a/src/bin/sp-meta.rs b/src/bin/sp-meta.rs index 63bfffb..f230157 100644 --- a/src/bin/sp-meta.rs +++ b/src/bin/sp-meta.rs @@ -22,9 +22,15 @@ struct Opt { } fn main() -> Result<()> { + match std::env::var("SUBPLOT_PLEASE") { + Ok(s) if s == "1" => {} + _ => { + eprintln!("error: Use of `sp-codegen` is deprecated."); + eprintln!("error: You should use `subplot codegen` instead."); + std::process::exit(1); + } + } let opt = Opt::from_args(); - eprintln!("warning: Use of `sp-meta` is deprecated."); - eprintln!("warning: You should use `subplot metadata` instead."); let mut doc = cli::load_document(&opt.filename, Style::default())?; let meta = Metadata::try_from(&mut doc)?; |