summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtoru-path2
-rwxr-xr-xtoru-utils6
-rwxr-xr-xtreepkg18
3 files changed, 21 insertions, 5 deletions
diff --git a/toru-path b/toru-path
index 71dc85c..5065a30 100755
--- a/toru-path
+++ b/toru-path
@@ -17,7 +17,7 @@ for _pkgbuild in ${pkgbuilds[@]}; do
continue
}
- fullpath=$(dirname $(readlink -f ${_pkgbuild}))
+ fullpath=$(dirname ${_pkgbuild})
for _pkg in ${pkgbase} ${pkgname[@]} ${provides[@]}; do
paths+=(${_pkg/[<>=]*}:${fullpath})
diff --git a/toru-utils b/toru-utils
index 2488091..9a7918e 100755
--- a/toru-utils
+++ b/toru-utils
@@ -78,6 +78,6 @@ trap_exit() {
# Trap signals from makepkg
set -E
-trap 'trap_exit "(prfullpkg:${level}) TERM signal caught. Exiting..."' TERM HUP QUIT
-trap 'trap_exit "(prfullpkg:${level}) Aborted by user! Exiting..."' INT
-trap 'trap_exit "(prfullpkg:${level}) An unknown error has occurred. Exiting..."' ERR
+trap 'trap_exit "TERM signal caught. Exiting..."' TERM HUP QUIT
+trap 'trap_exit "Aborted by user! Exiting..."' INT
+trap 'trap_exit "An unknown error has occurred. Exiting..."' ERR
diff --git a/treepkg b/treepkg
index 7d210cf..d21377d 100755
--- a/treepkg
+++ b/treepkg
@@ -1,5 +1,20 @@
#!/bin/bash
#set -x
+# (c) 2012 Nicolás Reynolds <fauno@parabola.nu>
+#
+# 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, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
source /etc/libretools.conf
source $XDG_CONFIG_HOME/libretools/libretools.conf >/dev/null 2>&1|| true
@@ -47,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
@@ -56,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}"