tj.git-extras/bin/git-extras
Sasha Khamkov 293119cf6c Bump version in bin/git-extras
- Bump version to 2.0.0 in `bin/git-extras` to enable updating package
via `git-extras update`
2014-09-21 09:55:56 +03:00

30 lines
519 B
Bash
Executable file

#!/bin/sh
VERSION="2.0.0"
update() {
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="$prefix" make install \
&& cd "$orig" \
&& echo "... updated git-extras $VERSION -> $(git extras --version)"
}
case "$1" in
-v|--version)
echo $VERSION && exit 0
;;
update)
update
;;
*)
man git-extras
;;
esac