diff options
Diffstat (limited to 'aur')
-rwxr-xr-x | aur | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -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 |