tj.git-extras/bin/git-extras
NANRI 434b7681ce git-extras: use git-help instead of man
PortableGit doesn't have man command.
2015-07-29 08:23:25 +02:00

27 lines
500 B
Bash
Executable file

#!/usr/bin/env bash
VERSION="3.0.0"
INSTALL_SCRIPT="https://raw.githubusercontent.com/tj/git-extras/master/install.sh"
update() {
local bin=$(which git-extras)
local prefix=${bin%/*/*}
local orig=$PWD
curl -s $INSTALL_SCRIPT | PREFIX="$prefix" bash /dev/stdin \
&& cd "$orig" \
&& echo "... updated git-extras $VERSION -> $(git extras --version)"
}
case "$1" in
-v|--version)
echo $VERSION && exit 0
;;
update)
update
;;
*)
git extras --help
;;
esac