summaryrefslogtreecommitdiff
path: root/treepkg
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-05-05 04:30:00 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-05-05 04:30:00 -0300
commit0cf421cc12aa31e20be266eee5ef701db130f96a (patch)
tree917d2c9265c4f4f45806e35f4a8eb31d86f51d56 /treepkg
parent0c4dc836d71282e2035680a4c8e165e66a8ac928 (diff)
Fixed bury function. Now it actually buries packages and skips if the current level is deeper than the requested
Diffstat (limited to 'treepkg')
-rwxr-xr-xtreepkg3
1 files changed, 2 insertions, 1 deletions
diff --git a/treepkg b/treepkg
index 67740ae..d21377d 100755
--- a/treepkg
+++ b/treepkg
@@ -62,7 +62,7 @@ add_order() {
bury() {
# Bury only if we are going to build the dep
# Get it's current depth and dir name
- local current_depth=$(egrep "build;[0-9]\+;${1};" "${BUILDORDER}" | cut -d ';' -f 2)
+ local current_depth=$(grep "build;[0-9]\+;${1};" "${BUILDORDER}" | cut -d ';' -f 2)
local current_name="$(printf "%03d" ${current_depth})_${1}"
# If there's a depth or the package is not the root of the build tree (which
@@ -71,6 +71,7 @@ bury() {
if [ -z "${current_depth}" ]; then return; fi
if [ -z "${current_name}" ]; then return; fi
if [ ${current_depth} -eq 0 ]; then return; fi
+ if [ ${current_depth} -ge $2 ]; then return; fi
${VERBOSE} && msg "Burying ${1} from ${current_depth} to ${2}"