diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-12-25 22:17:46 -0600 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-12-25 22:17:46 -0600 |
commit | 69acc962f6277cf591125ba111716a7c5723e70e (patch) | |
tree | 7411eee79826b88d2e0dc181278bcea3fece6723 /fullpkg | |
parent | cc746eb378b3d24a38e6f6b58890061fd2a995dd (diff) |
toru: -p flag for showing the path of some pkgname
Diffstat (limited to 'fullpkg')
-rwxr-xr-x | fullpkg | 21 |
1 files changed, 2 insertions, 19 deletions
@@ -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 |