diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2010-10-19 14:14:29 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2010-10-19 14:14:29 -0500 |
commit | 3bd59fcf0a72c8a29c2c1c3107e98a55eca5ecae (patch) | |
tree | 2d43231b6308b8d375816b585cd4d776d87e499c | |
parent | c61e49153921aef9583348c5410bdbf0ac346cc0 (diff) |
Use XDG_CONFIG_HOME and downloads blacklist only if it's newer than saved one, exits with 15 if a package has nonfree dependencies
-rwxr-xr-x | pkgbuild-check-nonfree | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree index 8b04733..53338b3 100755 --- a/pkgbuild-check-nonfree +++ b/pkgbuild-check-nonfree @@ -18,20 +18,19 @@ # You should have received a copy of the GNU General Public License # along with Parabola. If not, see <http://www.gnu.org/licenses/>. - + +ev=0 dir=$(pwd) -tempdir=$(mktemp -d) -cd $tempdir +config_dir=$XDG_CONFIG_HOME/libretools +if [-d $config_dir]; then + mkdir -p $config_dir +fi -# Run a sanity check -which pacman wget >/dev/null 2>/dev/null || { - echo "Cannot find pacman or wget, exiting"; - exit 1 -} +cd $config_dir echo "Downloading the blacklist of proprietary software packages." echo "" -wget http://www.parabolagnulinux.org/docs/blacklist.txt 2>/dev/null || { +wget -N http://www.parabolagnulinux.org/docs/blacklist.txt 2>/dev/null || { echo "Download failed, exiting" exit 1 } @@ -45,6 +44,7 @@ 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 @@ -52,10 +52,11 @@ done echo "Found in «makedepends»:" for item in ${makedepends[@]}; do if in_array $item ${a[@]}; then + ev=15 echo $item fi done -rm -rf $tempdir -exit 0 +cd $dir +exit $ev
\ No newline at end of file |