summaryrefslogtreecommitdiff
path: root/toru-where
diff options
context:
space:
mode:
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 $?