Skip to content

Instantly share code, notes, and snippets.

@prurigro
Last active August 29, 2015 14:17
Show Gist options
  • Save prurigro/76edec3d444489b6acdc to your computer and use it in GitHub Desktop.
Save prurigro/76edec3d444489b6acdc to your computer and use it in GitHub Desktop.
Upload PKGBUILD to the AUR using burp
#!/usr/bin/env bash
user=username
# Load category from .cat, or fail if it can't be found
[[ ! -f '.cat' ]] && {
printf '%s\n' 'Error: could not find .cat' >&2
exit 1
}
category="$(<.cat)"
# Load package variables from the PKGBUILD or fail if it can't be found
[[ ! -f 'PKGBUILD' ]] && {
printf '%s\n' 'Error: could not find PKGBUILD' >&2
exit 1
}
source PKGBUILD
[[ -n "$epoch" ]] \
&& epoch="$epoch:"
# Delete old source packages then create a new one and upload using burp
rm -rf ./*.src.tar.*
arch=i686 mkaurball
burp -u "$user" -p "$(gnome-keyring-query get AUR)" -c "$category" "$pkgname-$epoch$pkgver-$pkgrel.src.tar.gz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment