diff options
Diffstat (limited to 'src/aur')
-rwxr-xr-x | src/aur | 69 |
1 files changed, 25 insertions, 44 deletions
@@ -1,34 +1,34 @@ #!/usr/bin/env bash -# Copyright 2010 Joshua Ismael -# Copyright 2010 Nicolás Reynolds -# Copyright 2013 Luke Shumaker +# Copyright (C) 2010 Joshua Ismael +# Copyright (C) 2010 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker # -# This file is part of Parabola. +# This file is part of Parabola. # -# Parabola is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# Parabola is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Parabola is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# Parabola is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with Parabola. If not, see <http://www.gnu.org/licenses/>. +# You should have received a copy of the GNU General Public License +# along with Parabola. If not, see <http://www.gnu.org/licenses/>. . libremessages -cmd=${0##*/} usage() { - echo "Usage: $cmd [-h] pkgname-from-aur1 [pkgname-from-aur2 ...]" + print "Usage: %s [-h] PKGNAME [PKGNAME2 PKGNAME3...]" "${0##*/}" + print "Downloads packages from the AUR, and does basic freedom checks." echo - echo "This script will download packages from AUR to the current" - echo "directory and check their license for nonfree issues. This does" - echo "not mean that they are free; they may be incorrectly labeled, or" - echo "have other freedom issues. It's a tool to help Parabola" - echo "packagers, not to help users install things directly from AUR." + prose "This script will download packages from AUR to the current + directory and check their license for nonfree issues. This does + not mean that they are free; they may be incorrectly labeled, or + have other freedom issues. It's a tool to help Parabola + packagers, not to help users install things directly from AUR." } main() { @@ -45,7 +45,7 @@ main() { . $(librelib conf.sh) load_files libretools - check_vars libretools DIFFTOOL || exit 1 + check_vars libretools DIFFPROG || exit 1 local startdir="$(pwd)" local missing_deps=() @@ -88,7 +88,7 @@ main() { if ! cmp -s "${copy_old}/${file}" "${copy_new}/${file}" ; then warning "%s != %s" "${copy_old}/${file}" "${copy_new}/${file}" diffed=true - "${DIFFTOOL}" "${copy_old}/${file}" "${copy_new}/${file}" + "${DIFFPROG}" "${copy_old}/${file}" "${copy_new}/${file}" fi done if $diffed; then @@ -107,26 +107,7 @@ main() { ################################################################ pkgbuild-check-nonfree -c - case $? in - 0) :;; - 15) warning "This PKGBUILD links to known unfree packages";; - *) warning "pkgbuild-check-nonfree failed to run";; - esac - - ################################################################ - - local s=0 - pkgbuild-check-licenses || s=$? - for i in 1 2 4; do - if [[ $i -eq $(($s & $i)) ]]; then - case $i in - 1) warning "pkgbuild-check-licenses encountered an error";; - 2) warning "This PKGBUILD has an uncommon license";; - 4) warning "This PKGBUILD has a known nonfree license";; - esac - fi - done - unset s + pkgbuild-summarize-nonfree $? ################################################################ |