summaryrefslogtreecommitdiff
path: root/fullpkg
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-12-25 22:17:46 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-12-25 22:17:46 -0600
commit69acc962f6277cf591125ba111716a7c5723e70e (patch)
tree7411eee79826b88d2e0dc181278bcea3fece6723 /fullpkg
parentcc746eb378b3d24a38e6f6b58890061fd2a995dd (diff)
toru: -p flag for showing the path of some pkgname
Diffstat (limited to 'fullpkg')
-rwxr-xr-xfullpkg21
1 files changed, 2 insertions, 19 deletions
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