Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

aurdiff: compare local and remote PKGBUILD

  • Loading branch information...
commit d9fb4b9d9528fa6bc93d9041b51a84f5d9d46dbe 1 parent 2cce891
Ivan Kanakarakis authored December 05, 2011

Showing 1 changed file with 20 additions and 0 deletions. Show diff stats Hide diff stats

  1. 20  aurdiff
20  aurdiff
... ...
@@ -0,0 +1,20 @@
  1
+#!/bin/sh
  2
+
  3
+# Diff PKGBUILD in current directory with the one in the AUR.
  4
+# Thanks to Dave Reisner
  5
+
  6
+PKGBUILD=${1:-PKGBUILD}
  7
+
  8
+if [ ! -f "$PKGBUILD" -o ! -r "$PKGBUILD" ]; then
  9
+  echo "error: could not open file: $PKGBUILD" >&2
  10
+  exit 1
  11
+fi
  12
+
  13
+eval $(grep '^pkgname=' "$PKGBUILD")
  14
+if [ -z $pkgname ]; then
  15
+  echo "error: no definition of \$pkgname in $PKGBUILD" >&2
  16
+  exit 1
  17
+fi
  18
+
  19
+curl -s "http://aur.archlinux.org/packages/$pkgname/PKGBUILD" \
  20
+  | diff -u "$PKGBUILD" -

0 notes on commit d9fb4b9

Please sign in to comment.
Something went wrong with that request. Please try again.