From fe138085ad889447942f03b969f1a3abb862cb8a Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Wed, 15 Aug 2012 15:25:59 -0300 Subject: Toru-where is an utility to find PKGBUILD dirs on toru's path cache Use with toru-path --- treepkg | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'treepkg') 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 -- cgit v1.2.3-54-g00ecf