diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-02-01 10:20:22 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-02-01 10:20:22 -0300 |
commit | d36ee2573a3daebbeec15f6b3c13b4bec1ddf29b (patch) | |
tree | 4f403ab3a6dc04f5f5b013b49feb962d6bcb332f | |
parent | a966f5b8bc9343d0819d0be4204c4294e20ba908 (diff) |
pkgbuild-check-nonfree code cleanup
-rwxr-xr-x | pkgbuild-check-nonfree | 64 |
1 files changed, 26 insertions, 38 deletions
diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree index d4e999a..6c6f0db 100755 --- a/pkgbuild-check-nonfree +++ b/pkgbuild-check-nonfree @@ -19,53 +19,41 @@ # You should have received a copy of the GNU General Public License # along with Parabola. If not, see <http://www.gnu.org/licenses/>. +source /etc/libretools.conf +[[ -f $XDG_CONFIG_HOME/libretools/libretools.conf ]] && \ + source $XDG_CONFIG_HOME/libretools/libretools.conf + +pushd /tmp >/dev/null + ev=0 -dir=$(pwd) -config_dir=$XDG_CONFIG_HOME/libretools -if [ -d $config_dir ]; then - mkdir -p $config_dir -fi -cd $config_dir +[[ ${#BLACKLIST} -eq 0 ]] && { + echo "Please set up the BLACKLIST variable in your libretools.conf file" + exit 1 +} -echo "" echo "Downloading the blacklist of proprietary software packages." -echo "" -wget -N http://www.parabolagnulinux.org/docs/blacklist.txt 2>/dev/null || { +wget -N -q -O blacklist.txt "${BLACKLIST}" 2>/dev/null || { echo "Download failed, exiting" exit 1 } -a=($(cut -d: -f1 blacklist.txt)) -source /etc/rc.d/functions -source $dir/PKGBUILD +unfree=($(cut -d: -f1 blacklist.txt)) -for item in ${pkgname[@]}; do - if in_array $item ${a[@]}; then - echo "$item itself is non free" - ev=15 - fi -done +popd >/dev/null -echo "Looking for non-free dependancies" - -echo " Found in «depends»:" -for item in ${depends[@]} ; do - if in_array $item ${a[@]}; then - ev=15 - echo $item - fi -done - -echo " Found in «makedepends»:" -for item in ${makedepends[@]}; do - if in_array $item ${a[@]}; then - ev=15 - echo $item - fi +source /etc/rc.d/functions +source ./PKGBUILD + +echo "Looking for unfree dependencies" +for where in pkgname depends makedepends; do + echo " Found in «${where}»:" + for item in ${!where[@]} ; do + if in_array $item ${a[@]}; then + ev=15 + echo $item + fi + done done -cd $dir -echo "" - -exit $ev
\ No newline at end of file +exit $ev |