diff options
author | GitHub Action | 2023-09-04 05:09:42 +0000 |
---|---|---|
committer | GitHub Action | 2023-09-04 05:09:42 +0000 |
commit | 6ddeee8cae3e08a1432a4e22753641dbdea9a620 (patch) | |
tree | a227a3135bad6f2fe55e502655467dbd1a8eaf16 | |
parent | c56c6e3886c6937973dcca569f2d85096566dea3 (diff) | |
download | aur-6ddeee8cae3e08a1432a4e22753641dbdea9a620.tar.gz |
Update from GitHub Actions: feat(hyprshade-git): same completion as `hyprshade`
https://github.com/loqusion/aur-packages/actions/runs/6069342551
-rw-r--r-- | PKGBUILD | 31 |
1 files changed, 22 insertions, 9 deletions
@@ -36,15 +36,28 @@ pkgver() { } } +_get_wheel() { + local wheel= + local file + for file in ./dist/${_pkgname}-*.whl; do + if [ -n "$wheel" ]; then + echo "Multiple wheels found: $wheel and $file" >&2 + exit 1 + fi + wheel=$file + done + echo "$wheel" +} + build() { cd $_pkgname - pdm install --no-editable - pdm build + pdm build --no-isolation --no-sdist mkdir -p assets/completions - export PYTHONPATH="./src" - _HYPRSHADE_COMPLETE=bash_source pdm run hyprshade >assets/completions/hyprshade.bash - _HYPRSHADE_COMPLETE=fish_source pdm run hyprshade >assets/completions/hyprshade.fish - _HYPRSHADE_COMPLETE=zsh_source pdm run hyprshade >assets/completions/_hyprshade + _wheel=$(_get_wheel) + export PYTHONPATH="$_wheel" + _HYPRSHADE_COMPLETE=bash_source /usr/bin/python "$_wheel/$_pkgname" >assets/completions/$_pkgname.bash + _HYPRSHADE_COMPLETE=fish_source /usr/bin/python "$_wheel/$_pkgname" >assets/completions/$_pkgname.fish + _HYPRSHADE_COMPLETE=zsh_source /usr/bin/python "$_wheel/$_pkgname" >assets/completions/_$_pkgname } package() { @@ -54,7 +67,7 @@ package() { install -Dm0644 -t "$pkgdir/usr/share/licenses/$_pkgname/" LICENSE install -Dm0644 -t "$pkgdir/usr/share/$_pkgname/shaders/" shaders/* install -Dm0644 -t "$pkgdir/usr/share/$_pkgname/examples/" examples/* - install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" assets/completions/hyprshade.bash - install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" assets/completions/hyprshade.fish - install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" assets/completions/_hyprshade + install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" assets/completions/$_pkgname.bash + install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" assets/completions/$_pkgname.fish + install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" assets/completions/_$_pkgname } |