You've already forked aur_builder
add zsh sourcing script
This commit is contained in:
41
aur.sh
Normal file
41
aur.sh
Normal 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:
|
||||
Reference in New Issue
Block a user