-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate shell completions during build
- Loading branch information
Showing
10 changed files
with
411 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
**/*.rs.bk | ||
.idea/ | ||
*.iml | ||
fido2luks.bash | ||
fido2luks.elv | ||
fido2luks.fish | ||
fido2luks.zsh |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "fido2luks" | ||
version = "0.2.13" | ||
version = "0.2.14" | ||
authors = ["shimunn <[email protected]>"] | ||
edition = "2018" | ||
|
||
|
@@ -25,6 +25,15 @@ serde_json = "1.0.51" | |
serde_derive = "1.0.106" | ||
serde = "1.0.106" | ||
|
||
[build-dependencies] | ||
ctap_hmac = { version="0.4.2", features = ["request_multiple"] } | ||
hex = "0.3.2" | ||
ring = "0.13.5" | ||
failure = "0.1.5" | ||
rpassword = "4.0.1" | ||
libcryptsetup-rs = "0.4.1" | ||
structopt = "0.3.2" | ||
|
||
[profile.release] | ||
lto = true | ||
opt-level = 'z' | ||
|
@@ -38,6 +47,7 @@ build-depends = "libclang-dev, libcryptsetup-dev" | |
extended-description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator" | ||
assets = [ | ||
["target/release/fido2luks", "usr/bin/", "755"], | ||
["fido2luks.bash", "usr/share/bash-completion/completions/fido2luks", "644"], | ||
["initramfs-tools/keyscript.sh", "/lib/cryptsetup/scripts/fido2luks", "755" ], | ||
["initramfs-tools/hook/fido2luks.sh", "etc/initramfs-tools/hooks/", "755" ], | ||
["initramfs-tools/fido2luks.conf", "etc/", "644"], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#![allow(warnings)] | ||
#[macro_use] | ||
extern crate failure; | ||
extern crate ctap_hmac as ctap; | ||
|
||
#[path = "src/cli_args/mod.rs"] | ||
mod cli_args; | ||
#[path = "src/error.rs"] | ||
mod error; | ||
#[path = "src/util.rs"] | ||
mod util; | ||
|
||
use cli_args::Args; | ||
use std::env; | ||
use std::str::FromStr; | ||
use structopt::clap::Shell; | ||
use structopt::StructOpt; | ||
|
||
fn main() { | ||
// generate completion scripts, zsh does panic for some reason | ||
for shell in Shell::variants().iter().filter(|shell| **shell != "zsh") { | ||
Args::clap().gen_completions(env!("CARGO_PKG_NAME"), Shell::from_str(shell).unwrap(), "."); | ||
} | ||
} |
Oops, something went wrong.