From 473bc54dd925ebb1bcedc862b5a466e6dbb73a8f Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 6 Aug 2024 19:34:45 +0800 Subject: [PATCH] Integrate bash completion into Debian package --- apt/DEBIAN/control | 2 +- apt/make_debs.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apt/DEBIAN/control b/apt/DEBIAN/control index f7e4d8250..3957b0f3a 100644 --- a/apt/DEBIAN/control +++ b/apt/DEBIAN/control @@ -9,7 +9,7 @@ Rules-Requires-Root: no Package: $PACKAGE Version: $VERSION Architecture: $ARCH -Depends: hwloc, mesa-opencl-icd, aria2 +Depends: hwloc, mesa-opencl-icd, aria2, bash-completion Description: A Filecoin Storage Provider implementation. This Filecoin Storage Provider implementation is a fork of the Lotus project. It improves upon the previous by solving more complete problem sets including diff --git a/apt/make_debs.go b/apt/make_debs.go index 5654d5d26..1b48248f3 100644 --- a/apt/make_debs.go +++ b/apt/make_debs.go @@ -114,6 +114,12 @@ func part2(base, product, extra string) { base = path.Join(dir, "lib", "systemd", "system") OrPanic(os.MkdirAll(base, 0755)) OrPanic(copyFile("apt/curio.service", path.Join(base, "curio.service"))) + base = path.Join(dir, "usr", "share", "bash-completion", "completions") + OrPanic(os.MkdirAll(base, 0755)) + OrPanic(copyFile("scripts/completion/bash_autocomplete", path.Join(base, "curio"))) + base = path.Join(dir, "usr", "local", "share", "zsh", "site-functions") + OrPanic(os.MkdirAll(base, 0755)) + OrPanic(copyFile("scripts/completion/zsh_autocomplete", path.Join(base, "_curio"))) } // fix the debian/control "package" and "version" fields fb, err := os.ReadFile(path.Join(dir, "DEBIAN", "control"))