#!/usr/bin/env fish function xrreload -d "Reload all packages into the package repository" set repo "$XBPS_HOSTDIR"/binpkgs xbps-rindex -f -c "$repo" xbps-rindex -f -r "$repo" xbps-rindex -f -a "$repo"/*.xbps end function xrsync -d "Upload voidlinux package repository" rsync $argv -azvh --delete --progress \ "$XBPS_HOSTDIR"/binpkgs/{*.{xbps,xbps.sig},*-repodata} \ "$_agw_secret_void_copy_dir" end function xrupdate -d "Sign and upload voidlinux package repository" xrreload xbps-rindex --privkey "$_agw_secret_void_privkey" \ --sign-pkg "$XBPS_HOSTDIR"/binpkgs/*.xbps xrsync --dry-run echo "continue? [yes/no]" if test (read) = "yes" xrsync end end