summaryrefslogtreecommitdiff
path: root/treepkg
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-15 15:25:59 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-15 15:25:59 -0300
commitfe138085ad889447942f03b969f1a3abb862cb8a (patch)
tree782e71f1b32b822135031317fa69ffd021935e7b /treepkg
parent0a7e0e2866dd5a3b8c794b1aefcec58c15cbe9df (diff)
Toru-where is an utility to find PKGBUILD dirs on toru's path cache
Use with toru-path
Diffstat (limited to 'treepkg')
-rwxr-xr-xtreepkg13
1 files changed, 2 insertions, 11 deletions
diff --git a/treepkg b/treepkg
index 8dab83a..fcb9d29 100755
--- a/treepkg
+++ b/treepkg
@@ -81,17 +81,8 @@ bury() {
} || return 1
}
-# Finds a PKGBUILD on toru's path cache
-# Look in all caches but pick the first one
-# TODO move to a toru flag (-p?)
-where_is() {
- grep "^${1}:" "${TORUPATH}/paths" 2>/dev/null| \
- tail -n1 2>/dev/null|\
- cut -d: -f2 2>/dev/null
-}
-
# Guess the repo from the pkgbase path
-# $1 path, pwd or where_is
+# $1 path, pwd or toru-where
guess_repo() {
basename "$(dirname "${1}")"
}
@@ -176,7 +167,7 @@ if ! ${BUILDNOW}; then
egrep -q ";${_dep};" "${BUILDORDER}" && bury "${_dep}" ${NEXTDEPTH}
# Ask toru where's a PKGBUILD
- depdir="$(where_is ${_dep})"
+ depdir="$(toru-where ${_dep})"
if [ -z "${depdir}" -o ! -d "${depdir}" ]; then
# We specify the pkgname because we can't source the dep PKGBUILD