summaryrefslogtreecommitdiff
path: root/aur
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-08 21:58:10 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-08 21:58:10 -0300
commit0e929530a592dec84439a1c71ca57513517b8e94 (patch)
treef8942049e49b7e9a0a4655631229e02d160eaf9c /aur
parentd12f9a0ac7ce2ff20ce59e3603ce0783c473ffb6 (diff)
stdnull doesn't require quoting. first stab at aur client
Diffstat (limited to 'aur')
-rwxr-xr-xaur56
1 files changed, 56 insertions, 0 deletions
diff --git a/aur b/aur
new file mode 100755
index 0000000..e300dd1
--- /dev/null
+++ b/aur
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+source /etc/libretools.conf
+source /etc/abs.conf
+
+missing_deps=()
+for _pkg in ${@}; do
+ msg "Downloading $_pkg..."
+ wget -O - -q http://aur.archlinux.org/packages/$_pkg/$_pkg.tar.gz | \
+ tar xzf - >/dev/null 2>&1
+
+ [[ $? -ne 0 ]] && {
+ error "Couldn't get $_pkg"
+ continue
+ }
+
+ stdnull pushd $_pkg
+
+ source PKGBUILD
+
+ pkgbuild-check-nonfree || {
+ warning "This PKGBUILD links to known unfree packages"
+ }
+
+ msg2 "Checking license..."
+ free=0
+ for _license in ${license[@]}; do
+ if ! -d /usr/share/licenses/common/$_license; then
+ warning "License $_license is not a common license"
+ free=1
+ fi
+ done
+
+ if [ $free -eq 1 ]; then
+ plain "Please check that the license is included in the package and
+ *specially* that it respects your freedom."
+ fi
+
+ for _dep in ${depends[@]} ${makedepends[@]}; do
+ if ! is_built $_dep; then
+ if ! find ${ABSROOT} -maxdepth 2 -type d -name "$_dep" | egrep "*" >/dev/null ; then
+ missing_deps=(${missing_deps} $_dep)
+ fi
+ fi
+ done
+
+ stdnull popd
+
+done
+
+[[ ${#missing_deps[*]} -gt 0 ]] && {
+ msg2 "Retrieving missing deps: ${missing_deps[@]}"
+ $0 ${missing_deps[@]}
+}
+
+exit 0