summaryrefslogtreecommitdiff
path: root/src/fullpkg/fullpkg-find
diff options
context:
space:
mode:
Diffstat (limited to 'src/fullpkg/fullpkg-find')
-rwxr-xr-xsrc/fullpkg/fullpkg-find68
1 files changed, 35 insertions, 33 deletions
diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find
index a96bc8a..c12888a 100755
--- a/src/fullpkg/fullpkg-find
+++ b/src/fullpkg/fullpkg-find
@@ -1,38 +1,39 @@
#!/usr/bin/env bash
# set -x # uncomment for debug
-# Copyright (c) 2011-2012 Joshua I. Haase H. (xihh) <hahj87@gmail.com>
-# Copyright (c) 2011-2012 Nicolás Reynolds <fauno@kiwwwi.com.ar>
-# Copyright (c) 2012 Michał Masłowski <mtjm@mtjm.eu>
-# Copyright (c) 2012-2013 Luke Shumaker <LukeShu@sbcglobal.net>
+# Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
+# Copyright (C) 2011-2012 Nicolás Reynolds <fauno@parabola.nu>
+# Copyright (C) 2012 Michał Masłowski <mtjm@mtjm.eu>
+# Copyright (C) 2013-2014 Luke Shumaker <lukeshu@sbcglobal.net>
#
# The copy_files() function is taken from makechrootpkg:
-# Copyright (c) 2007 Armin Luntzer <armin@archlinuxppc.org>
-# Copyright (c) 2007 Jason Chu <jchu@xentac.net>
-# Copyright (c) 2007, 2011 Dan McGee <dan@archlinux.org>
-# Copyright (c) 2007-2008 Travis Willard <travis@archlinux.org>
-# Copyright (c) 2007-2009 Aaron Griffin <aaronmgriffin@gmail.com>
-# Copyright (c) 2008 Simo Leone <simo@archlinux.org>
-# Copyright (c) 2009 Biru Ionut <biru.ionut@gmail.com>
-# Copyright (c) 2009 Biru Ionut <ionut@archlinux.ro>
-# Copyright (c) 2009 Evangelos Foutras <foutrelis@gmail.com>
-# Copyright (c) 2009 Francois Charette <francois@samarqand.localdomain>
-# Copyright (c) 2009 Nezmer <Nezmer@allurelinux.org>
-# Copyright (c) 2009 Ronald van Haren <pressh@gmail.com>
-# Copyright (c) 2009-2011 Andrea Scarpino <andrea@archlinux.org>
-# Copyright (c) 2009-2012 Allan McRae <allan@archlinux.org>
-# Copyright (c) 2009-2012 Eric Bélanger <snowmaniscool@gmail.com>
-# Copyright (c) 2009-2012 Pierre Schmitz <pierre@archlinux.de>
-# Copyright (c) 2010 Byron Clark <byron@theclarkfamily.name>
-# Copyright (c) 2011 Ionut Biru <ibiru@archlinux.org>
-# Copyright (c) 2011 Lukas Fleischer <archlinux@cryptocrack.de>
-# Copyright (c) 2011-2012 Florian Pritz <bluewind@xinu.at>
-# Copyright (c) 2011-2013 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
-# Copyright (c) 2013 Sébastien Luttringer <seblu@seblu.net>
+# Copyright (C) 2007 Armin Luntzer <armin@archlinuxppc.org>
+# Copyright (C) 2007 Jason Chu <jchu@xentac.net>
+# Copyright (C) 2007, 2011 Dan McGee <dan@archlinux.org>
+# Copyright (C) 2007-2008 Travis Willard <travis@archlinux.org>
+# Copyright (C) 2007-2009 Aaron Griffin <aaronmgriffin@gmail.com>
+# Copyright (C) 2008 Simo Leone <simo@archlinux.org>
+# Copyright (C) 2009 Biru Ionut <ibiru@archlinux.org>
+# Copyright (C) 2009 Evangelos Foutras <foutrelis@gmail.com>
+# Copyright (C) 2009 Francois Charette <francois@samarqand.localdomain>
+# Copyright (C) 2009 Nezmer <Nezmer@allurelinux.org>
+# Copyright (C) 2009 Ronald van Haren <pressh@gmail.com>
+# Copyright (C) 2009-2011 Andrea Scarpino <andrea@archlinux.org>
+# Copyright (C) 2009-2012 Allan McRae <allan@archlinux.org>
+# Copyright (C) 2009-2012 Eric Bélanger <snowmaniscool@gmail.com>
+# Copyright (C) 2009-2012 Pierre Schmitz <pierre@archlinux.de>
+# Copyright (C) 2010 Byron Clark <byron@theclarkfamily.name>
+# Copyright (C) 2011 Ionut Biru <ibiru@archlinux.org>
+# Copyright (C) 2011 Lukas Fleischer <archlinux@cryptocrack.de>
+# Copyright (C) 2011-2012 Florian Pritz <bluewind@xinu.at>
+# Copyright (C) 2011-2013 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Copyright (C) 2013 Sébastien Luttringer <seblu@seblu.net>
#
# Because of the code from makechrootpkg, this file is GPLv2, instead of GPLv3
# like most of libretools.
#
+# License: GNU GPLv2
+#
# This program 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; version 2 of the License.
@@ -51,7 +52,7 @@
# Get repo name. Asumes ${ABSROOT}/repo/package/PKGBUILD
guess_repo() {
- basename $(dirname $(pwd))
+ basename "$(dirname "$(pwd)")"
}
# This function is stolen from makechrootpkg.
@@ -120,11 +121,12 @@ find_deps() {
## Check next levels
declare -i next_level=$LEVEL+1
- # All deps in separate line, only once, without version.
- deps=($(echo "${depends[@]} ${makedepends[@]}" | \
- sed "s/[=<>]\+[^ ]\+//g" | \
- tr ' ' "\n" | \
- sort -u))
+ # All deps
+ local deps=("${depends[@]}" "${makedepends[@]}" "${checkdepends[@]}")
+ # Strip version specifiers
+ deps=("${deps[@]%%[=<>]*}")
+ # Filter out duplicates
+ read -d $'\n' -a deps <<<"$(printf '%s\n' "${deps[@]}"|sort -u)"
local _dep
for _dep in "${deps[@]}"; do
@@ -139,7 +141,7 @@ find_deps() {
pushd "${pkgdir}" > /dev/null
# runs itself on dep's PKGBUILD dir
- $0 -l ${next_level} ${build_dir} || return $?
+ "$0" -l "${next_level}" "${build_dir}" || return $?
popd > /dev/null
fi