summaryrefslogtreecommitdiff
path: root/src/fullpkg/fullpkg-find
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-03 02:16:44 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-03 02:16:44 -0500
commit52cc0c3ff27d4c48d3461d9fd898367aa4a92631 (patch)
treef4d2b4fcfbc1c6cda116b7723ebe2eee774b0cd6 /src/fullpkg/fullpkg-find
parent3793e4fac9d1d853251e84838caa2b8849d1f32b (diff)
parent58e2a9cd5aa9a4eb80f8da675685f62aca128eb3 (diff)
Merge branch 'master' into xbs
Conflicts: src/lib/conf.sh
Diffstat (limited to 'src/fullpkg/fullpkg-find')
-rwxr-xr-xsrc/fullpkg/fullpkg-find13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find
index 566605a..a96bc8a 100755
--- a/src/fullpkg/fullpkg-find
+++ b/src/fullpkg/fullpkg-find
@@ -104,7 +104,7 @@ find_deps() {
# greater levels are built first
echo "${LEVEL}:${pkgbase}" >>"$build_dir/BUILDORDER"
# PKGBUILD is already there
- if [ -d "${build_dir}/${pkgbase}" ]; then
+ if [[ -d "${build_dir}/${pkgbase}" ]]; then
exit 0
# Copy dir to build_dir
else
@@ -126,14 +126,15 @@ find_deps() {
tr ' ' "\n" | \
sort -u))
- for _dep in ${deps[@]}; do
+ local _dep
+ for _dep in "${deps[@]}"; do
local found=false
# May fail, e.g. since abslibre-mips64el doesn't include
# arch=any packages.
local pkgdir=$(toru -p ${_dep}) || true
- if [ -n "$pkgdir" -a -d "${pkgdir}" ]; then
+ if [[ -n "$pkgdir" ]] && [[ -d "${pkgdir}" ]; then
found=true
pushd "${pkgdir}" > /dev/null
@@ -193,7 +194,7 @@ while getopts 'hA:l:cmn' arg; do
esac
done
-if [ ! -r PKGBUILD ]; then
+if [[ ! -r PKGBUILD ]]; then
error "This directory doesnt contain a PKGBUILD"
usage
exit 1
@@ -202,11 +203,11 @@ fi
shift $(( OPTIND - 1 ))
build_dir="${1}"
-if [ "$LEVEL" -eq 0 ]; then
+if [[ "$LEVEL" -eq 0 ]]; then
build_dir="${1:-$(mktemp -d /tmp/fullpkg.XXXXXX)}"
- if [ ! -d "$build_dir" ]; then
+ if [[ ! -d "$build_dir" ]]; then
mkdir -p "$build_dir"
elif "$CLEANFIRST"; then
# Erase files already in dir