From 69acc962f6277cf591125ba111716a7c5723e70e Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Sun, 25 Dec 2011 22:17:46 -0600 Subject: toru: -p flag for showing the path of some pkgname --- fullpkg | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'fullpkg') diff --git a/fullpkg b/fullpkg index eddf3d5..bd2e8ae 100755 --- a/fullpkg +++ b/fullpkg @@ -40,23 +40,6 @@ usage() { } -# 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() { - local _repo - local _path - for _repo in ${REPOS[@]}; do - _path=$(grep "^${1}:" "${TORUPATH}/${_repo}.paths.cache" 2>/dev/null| \ - cut -d: -f2 2>/dev/null) - - [ -n "${_path}" ] && break - done - - echo ${_path} - -} - # Removes a package from the buildorder # $1 package name # $2 buildorder file @@ -148,9 +131,9 @@ find_deps() { for _dep in ${deps[@]}; do local found=false - local pkgdir=$(where_is ${_dep}) + local pkgdir=$(toru -p ${_dep}) - if [ -d "${pkgdir}" ]; then + if [ -n "$pkgdir" -a -d "${pkgdir}" ]; then found=true pushd "${pkgdir}" > /dev/null -- cgit v1.2.3-54-g00ecf