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
This commit is contained in:
Wil Moore III 2012-06-04 14:34:46 -06:00
parent 0b71ff6797
commit b3cf0c8b3d

View file

@ -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 \