summaryrefslogtreecommitdiff
path: root/aur
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-22 11:13:52 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-22 11:13:52 -0300
commit4f1392d774c081a03d9abab0c731704880d54d4c (patch)
treeabfa5f7c1dc185ddfbf2957b8094feb925a432b2 /aur
parent50435a2614fe7f28e47164082e846b0a57c7f48c (diff)
parent3c53f6e6e8a9dc767680c5a53969e3d9aa3c5d81 (diff)
Merge branch 'master' of ssh://vparabola/srv/git/projects/libretools
Conflicts: libremessages
Diffstat (limited to 'aur')
-rwxr-xr-xaur22
1 files changed, 19 insertions, 3 deletions
diff --git a/aur b/aur
index e300dd1..b7ad018 100755
--- a/aur
+++ b/aur
@@ -3,6 +3,20 @@
source /etc/libretools.conf
source /etc/abs.conf
+function usage {
+ echo "Usage: $0 pkgname-from-aur1 [pkgname-from-aur2 ...]"
+ echo
+ echo "This script will download packages from aur to the current dir"
+ echo "and check their license for nonfree issues."
+}
+
+while getopts 'h' arg; do
+ case $arg in
+ h) usage; exit 0 ;;
+ *) usage; exit 1 ;;
+ esac
+done
+
missing_deps=()
for _pkg in ${@}; do
msg "Downloading $_pkg..."
@@ -14,18 +28,20 @@ for _pkg in ${@}; do
continue
}
- stdnull pushd $_pkg
+ stdnull "pushd $_pkg"
source PKGBUILD
pkgbuild-check-nonfree || {
- warning "This PKGBUILD links to known unfree packages"
+ if [ $? -eq 15 ]; then
+ warning "This PKGBUILD links to known unfree packages"
+ fi
}
msg2 "Checking license..."
free=0
for _license in ${license[@]}; do
- if ! -d /usr/share/licenses/common/$_license; then
+ if [ ! -d /usr/share/licenses/common/$_license ]; then
warning "License $_license is not a common license"
free=1
fi