summaryrefslogtreecommitdiff
path: root/toru-where
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-15 15:25:59 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-15 15:25:59 -0300
commitfe138085ad889447942f03b969f1a3abb862cb8a (patch)
tree782e71f1b32b822135031317fa69ffd021935e7b /toru-where
parent0a7e0e2866dd5a3b8c794b1aefcec58c15cbe9df (diff)
Toru-where is an utility to find PKGBUILD dirs on toru's path cache
Use with toru-path
Diffstat (limited to 'toru-where')
-rwxr-xr-xtoru-where11
1 files changed, 11 insertions, 0 deletions
diff --git a/toru-where b/toru-where
new file mode 100755
index 0000000..02a7a88
--- /dev/null
+++ b/toru-where
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Locates a PKGBUILD dir on toru's path cache
+
+source $(dirname $(command -v $0))/toru-utils
+
+# 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
+
+exit $?