Created
March 1, 2011 10:20
-
-
Save namelessjon/848942 to your computer and use it in GitHub Desktop.
script to diff local PKGBUILD with AUR pkgbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Source: https://bbs.archlinux.org/viewtopic.php?pid=853603#p853603 | |
# Author: falconindy | |
DIFF=${DIFF:-diff} | |
if [[ ! -f PKGBUILD ]]; then | |
echo "error: No PKGBUILD found in working directory." | |
exit 1 | |
fi >&2 | |
eval $(grep '^pkgname=' PKGBUILD) | |
if [[ -z $pkgname ]]; then | |
echo "error: pkgname not found in PKGBUILD" | |
exit 1 | |
fi >&2 | |
diff ${@:--u} PKGBUILD <(curl -s "http://aur.archlinux.org/packages/$pkgname/$pkgname/PKGBUILD") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment