Compare commits

..

1 Commits

Author SHA1 Message Date
27e99a32cd add zsh sourcing script 2026-02-22 22:17:35 -05:00

41
aur.sh Normal file
View File

@@ -0,0 +1,41 @@
# shellcheck shell=bash
aur_build() {
local args=()
while [[ $# -gt 0 ]]; do
case $1 in
--debug) args+=("-e" "DEBUG_SHELL=y") ;;
--skip-native) args+=("-e" "SKIP_NATIVE=y") ;;
*)
echo "Unknown option: $1"
return 1
;;
esac
shift
done
podman run --pull newer --rm -it "${args[@]}" -v "$PWD:/w" gitea.balki.me/balki/aur_builder:latest
}
_aur_build() {
local -a flags
flags=(
'--debug:pause in a debug bash shell'
'--skip-native:do not force native architecture'
)
_describe 'flags' flags
}
compdef _aur_build aur_build
aur_upload() {
curl --user "balki:${ARCH_REPO_TOKEN?token missing}" \
--upload-file "${1?package file missing}" \
https://gitea.balki.me/api/packages/balki-aur/arch/balki-aur
}
compdef '_files -g "*.pkg.tar.zst"' aur_upload
zstyle ':completion:*:*:aur_upload:*' file-sort modification
# vim: set filetype=zsh: