tweak update a bit

This commit is contained in:
TJ Holowaychuk 2012-06-04 13:48:38 -07:00
parent c94619f920
commit 37424606ba

View file

@ -3,15 +3,15 @@
VERSION="1.5.1"
update() {
local binfile=$(which git-extras)
local binpath=${binfile%/*/*}
local bin=$(which git-extras)
local prefix=${bin%/*/*}
local orig=$PWD
cd /tmp \
&& rm -fr ./git-extras \
&& git clone --depth 1 https://github.com/visionmedia/git-extras.git \
&& cd git-extras \
&& PREFIX=${binpath:=} make install \
&& PREFIX="$prefix" make install \
&& cd "$orig" \
&& echo "... updated git-extras $VERSION -> $(git extras --version)"
}