aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-04-18 00:57:36 -0400
committerJesse Luehrs <doy@tozt.net>2021-04-18 00:57:36 -0400
commit1da2ca9044226f55e209e09f17f4ae6a46531c2a (patch)
treecee52832d53c11d48abee7cb6d13f7cbaba7916b
parent4d2c581e3fec28a8f71e0bd76dc4431568b7e63c (diff)
downloadrbw-1da2ca9044226f55e209e09f17f4ae6a46531c2a.tar.gz
rbw-1da2ca9044226f55e209e09f17f4ae6a46531c2a.zip
package completion files with the debian package
-rw-r--r--Cargo.toml8
-rw-r--r--Makefile9
2 files changed, 16 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index cbeac72..3f4dff0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -57,3 +57,11 @@ zeroize = "1.2"
[package.metadata.deb]
depends = "pinentry"
license-file = ["LICENSE"]
+assets = [
+ ["target/release/rbw", "usr/bin/", "755"],
+ ["target/release/rbw-agent", "usr/bin/", "755"],
+ ["target/release/completion/bash", "usr/share/bash-completion/completions/rbw", "644"],
+ ["target/release/completion/zsh", "usr/share/zsh/vendor-completions/_rbw", "644"],
+ ["target/release/completion/fish", "usr/share/fish/completions/rbw.fish", "644"],
+ ["README.md", "usr/share/doc/rbw/README", "644"],
+]
diff --git a/Makefile b/Makefile
index 6ba6476..cedf8b5 100644
--- a/Makefile
+++ b/Makefile
@@ -34,13 +34,20 @@ cleanall: clean
@cargo clean
.PHONY: cleanall
+completion: release
+ @mkdir -p target/x86_64-unknown-linux-musl/release/completion
+ @./target/x86_64-unknown-linux-musl/release/rbw gen-completions bash > target/x86_64-unknown-linux-musl/release/completion/bash
+ @./target/x86_64-unknown-linux-musl/release/rbw gen-completions zsh > target/x86_64-unknown-linux-musl/release/completion/zsh
+ @./target/x86_64-unknown-linux-musl/release/rbw gen-completions fish > target/x86_64-unknown-linux-musl/release/completion/fish
+.PHONY: completion
+
package: pkg/$(DEB_PACKAGE)
.PHONY: package
pkg:
@mkdir pkg
-pkg/$(DEB_PACKAGE): release | pkg
+pkg/$(DEB_PACKAGE): release completion | pkg
@cargo deb --no-build --target x86_64-unknown-linux-musl && mv target/x86_64-unknown-linux-musl/debian/$(DEB_PACKAGE) pkg
pkg/$(DEB_PACKAGE).minisig: pkg/$(DEB_PACKAGE)