diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2010-10-16 18:32:14 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2010-10-16 18:32:14 -0500 |
commit | a706c17633d423d29e54bb7bfc9f225553774c5b (patch) | |
tree | 46adc7eb5948a1f60a79f1370d355841873dbaf0 /repo-list-diff | |
parent | 63d9963fd3214d0a888a47109b517c87ffcb7ee5 (diff) |
Archivos primera versión (no funciona bien)
Diffstat (limited to 'repo-list-diff')
-rwxr-xr-x | repo-list-diff | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/repo-list-diff b/repo-list-diff new file mode 100755 index 0000000..49aea51 --- /dev/null +++ b/repo-list-diff @@ -0,0 +1,53 @@ +#!/bin/bash +# (C) This script is free software! You can do what you want with it, as long as you don't convert it into proprietary software +# and if you redistribute it either vertabim or modified you must do so under the same licence or GPLv3 or later. + +dirname=$(pwd) +tempdir=$(mktemp -d) +cd $tempdir + +#Run a sanity check +which pacman sudo wget >/dev/null 2>/dev/null || { + echo "Cannot find pacman, sudo or wget, exiting"; + exit 1 +} + +echo "" +echo "Updating pacman database." +echo "" +sudo pacman -Sy --noconfirm >>"$dirname/db-sync" 2>>"$dirname/db-sync" + +echo "Downloading the whitelist of free software packages." +echo "" +wget http://www.parabolagnulinux.org/docs/whitelist.txt 2>/dev/null || { + echo "Download failed, exiting" + exit 1 +} + +a=($(cut -d: -f1 whitelist.txt)) + +echo "Searching for packages in whitelist and not in repo" +echo "" + +for i in ${a[@]} ; do + pacman -Si $i >/dev/null 2>/dev/null || echo $i >> "$dirname/in whitelist and not in repo" +done + +echo "Downloading the blacklist of proprietary software packages." +echo "" +wget http://www.parabolagnulinux.org/docs/blacklist.txt 2>/dev/null || { + echo "Download failed, exiting" + exit 1 +} + +a=($(cut -d: -f1 blacklist.txt)) + +echo "Searching for packages in blacklist and in repo" +echo "" + +for i in ${a[@]} ; do + pacman -Si $i >/dev/null 2>/dev/null && echo $i >> "$dirname/in blacklist and in repo" +done + +rm -rf $tempdir +exit 0 |