From ee40153178ec333278cc4aa422c5b237af6d858d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Thu, 7 Jun 2012 14:32:28 -0300 Subject: Get the last path, not the first one (fixes not found on repo change) --- treepkg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.2