summaryrefslogtreecommitdiff
path: root/treepkg
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-07 14:32:28 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-07 14:32:28 -0300
commitee40153178ec333278cc4aa422c5b237af6d858d (patch)
tree87210cbb1f936b573724c4d203ca9d8250521bd9 /treepkg
parentff089d0a64dbf280c73e2ad6b11f82d015e229bd (diff)
Get the last path, not the first one (fixes not found on repo change)
Diffstat (limited to 'treepkg')
-rwxr-xr-xtreepkg3
1 files changed, 2 insertions, 1 deletions
diff --git a/treepkg b/treepkg
index d21377d..8dab83a 100755
--- a/treepkg
+++ b/treepkg
@@ -85,7 +85,8 @@ bury() {
# Look in all caches but pick the first one
# TODO move to a toru flag (-p?)
where_is() {
- grep -m1 "^${1}:" "${TORUPATH}/paths" 2>/dev/null| \
+ grep "^${1}:" "${TORUPATH}/paths" 2>/dev/null| \
+ tail -n1 2>/dev/null|\
cut -d: -f2 2>/dev/null
}