From b3cf0c8b3debcc753cb5d7f05349d4d09a61986b Mon Sep 17 00:00:00 2001 From: Wil Moore III Date: Mon, 4 Jun 2012 14:34:46 -0600 Subject: [PATCH] Favoring the use of bash "Parameter Expansion" instead of "dirname" as "dirname" has some cross-platform challenges. - removed the superfluous stderr redirection - switched out dirname for param expansion --- bin/git-extras | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/git-extras b/bin/git-extras index b3289ff..17d5692 100755 --- a/bin/git-extras +++ b/bin/git-extras @@ -3,9 +3,10 @@ VERSION="1.5.1" update() { - local binfile=$(which git-extras 2>/dev/null) - local binpath=$(dirname $(dirname ${binfile} 2>/dev/null) 2>/dev/null) + local binfile=$(which git-extras) + local binpath=${binfile%/*/*} local orig=$PWD + cd /tmp \ && rm -fr ./git-extras \ && git clone --depth 1 https://github.com/visionmedia/git-extras.git \