summaryrefslogtreecommitdiff
path: root/toru-where
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-20 16:04:17 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-20 16:04:17 -0300
commit12377d79078170ec47c1fa5fb56b12ecb13367e8 (patch)
treec09c6db12782575b31c15c7df883ecf34add9a67 /toru-where
parentb4c8f17a6d97b63589b624d726e10d64cbd743ec (diff)
Use TokyoCabinet to store the PKGBUILD path cache
Diffstat (limited to 'toru-where')
-rwxr-xr-xtoru-where9
1 files changed, 4 insertions, 5 deletions
diff --git a/toru-where b/toru-where
index 02a7a88..f732dc0 100755
--- a/toru-where
+++ b/toru-where
@@ -1,11 +1,10 @@
#!/bin/bash
# Locates a PKGBUILD dir on toru's path cache
-source $(dirname $(command -v $0))/toru-utils
+source /etc/libretools.conf
-# Look in all cached but pick the last one
-grep "^${1}:" "${TORUPATH}/paths" 2>/dev/null| \
- tail -n1 2>/dev/null|\
- cut -d: -f2 2>/dev/null
+PATHFILE=${TORUPATH}/paths.tch
+
+exec tcamgr get ${PATHFILE} $1
exit $?