summaryrefslogtreecommitdiffstats
path: root/sqv/build.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-11-26 17:24:47 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-11-26 19:50:41 +0100
commit02e61f0758e93b44a054a01b4137ea25ff7dd5ec (patch)
treeb1ef6b097e5fc93faf20433219565bbabfa04fb5 /sqv/build.rs
parent557aca35bad457622642308c1d780757b174bf50 (diff)
sqv: Move sqv into a new crate.
- This allows us to use sequoia-openpgp without compression support reducing binary size and trusted computing base.
Diffstat (limited to 'sqv/build.rs')
-rw-r--r--sqv/build.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/sqv/build.rs b/sqv/build.rs
new file mode 100644
index 00000000..290a1a6b
--- /dev/null
+++ b/sqv/build.rs
@@ -0,0 +1,20 @@
+extern crate clap;
+
+use std::env;
+use clap::Shell;
+
+mod sqv_cli {
+ include!("src/sqv_cli.rs");
+}
+
+fn main() {
+ let outdir = match env::var_os("OUT_DIR") {
+ None => return,
+ Some(outdir) => outdir,
+ };
+ let mut sqv = sqv_cli::build();
+ for shell in &[Shell::Bash, Shell::Fish, Shell::Zsh, Shell::PowerShell,
+ Shell::Elvish] {
+ sqv.gen_completions("sqv", *shell, &outdir);
+ }
+}