George Hu pushed to branch main at Arch Linux / Packaging / Packages / typstyle


Commits:
afa93f6b by George Hu at 2026-01-18T00:38:15+08:00
Refactor commands of shell completion generation

- - - - -


1 changed file:

- PKGBUILD


Changes:

=====================================
PKGBUILD
=====================================
@@ -22,17 +22,13 @@ prepare() {
 build() {
     cd "$pkgname-$pkgver"
     cargo build --frozen --release --all-features
-
-    mkdir -p "completions"
-    for shell in bash zsh fish; do
-        "target/release/$pkgname" completions $shell 
>"completions/$pkgname-completion.$shell"
-    done
 }
 
 package() {
-    install -Dm755 "$pkgname-$pkgver/target/release/$pkgname" 
"$pkgdir/usr/bin/$pkgname"
+    cd "$pkgname-$pkgver/target/release"
+    install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
 
-    install -Dm644 "$pkgname-$pkgver/completions/$pkgname-completion.bash" 
"$pkgdir/usr/share/bash-completion/completions/$pkgname"
-    install -Dm644 "$pkgname-$pkgver/completions/$pkgname-completion.zsh" 
"$pkgdir/usr/share/zsh/site-functions/_$pkgname"
-    install -Dm644 "$pkgname-$pkgver/completions/$pkgname-completion.fish" 
"$pkgdir/usr/share/fish/vendor_completions.d/$pkgname.fish"
+    install -Dm644 <("./$pkgname" completions bash) 
"$pkgdir/usr/share/bash-completion/completions/$pkgname"
+    install -Dm644 <("./$pkgname" completions zsh) 
"$pkgdir/usr/share/zsh/site-functions/_$pkgname"
+    install -Dm644 <("./$pkgname" completions fish) 
"$pkgdir/usr/share/fish/vendor_completions.d/$pkgname.fish"
 }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/typstyle/-/commit/afa93f6bf5624a13e3624fb8bb0badc0359b76fd

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/typstyle/-/commit/afa93f6bf5624a13e3624fb8bb0badc0359b76fd
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to