aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-10-17 02:33:08 +0200
committerGustav Sörnäs <gustav@sornas.net>2020-10-17 02:33:08 +0200
commit8ca37b7528ca619610a724d9730d786d027d3ab8 (patch)
treec558ed7d8e6efff41ec35fbdab852742e17cc1c8
parent4e8402c01953aabe6787aa554d979b99da9f9d3b (diff)
downloadmum-8ca37b7528ca619610a724d9730d786d027d3ab8.tar.gz
hotfix main
-rw-r--r--PKGBUILD13
-rw-r--r--mumctl/src/main.rs3
2 files changed, 14 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fd586f7..affda47 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,12 +10,20 @@ url="https://github.com/sornas/mum.git"
license=('MIT')
sha256sums=('SKIP')
depends=('alsa-lib' 'opus' 'openssl')
+optdepends=('bash: for tab-completions',
+ 'fish: for tab-completions',
+ 'zsh: for tab-completions')
makedepends=('git' 'rust')
source=("git+$url")
build() {
cd "${srcdir}/${pkgname%-git}"
+
cargo build --release --target-dir=target
+
+ which bash &>/dev/null && ./target/release/mumctl completions --bash > mumctl.bash
+ which fish &>/dev/null && ./target/release/mumctl completions --fish > mumctl.fish
+ which zsh &>/dev/null && ./target/release/mumctl completions --zsh > mumctl.zsh
}
check() {
@@ -25,6 +33,11 @@ check() {
package() {
cd "${srcdir}/${pkgname%-git}"
+
+ which bash &>/dev/null && install -Dm 755 mumctl.bash "${pkgdir}/usr/share/bash-completion/completions/mumctl"
+ which fish &>/dev/null && install -Dm 755 mumctl.fish "${pkgdir}/usr/share/fish/completions/mumctl.fish"
+ which zsh &>/dev/null && install -Dm 755 mumctl.zsh "${pkgdir}/usr/share/zsh/site-functions/_mumctl"
+
install -Dm 755 target/release/mumctl -t "${pkgdir}/usr/bin"
install -Dm 755 target/release/mumd -t "${pkgdir}/usr/bin"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs
index 5c07f7b..e0beb2f 100644
--- a/mumctl/src/main.rs
+++ b/mumctl/src/main.rs
@@ -1,11 +1,10 @@
use clap::{App, AppSettings, Arg, Shell, SubCommand};
use colored::Colorize;
-use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
+use ipc_channel::ipc::{self, IpcSender};
use log::*;
use mumlib::command::{Command, CommandResponse};
use mumlib::setup_logger;
use std::{fs, io};
-use colored::Colorize;
macro_rules! err_print {
($func:expr) => {