mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
30 lines
519 B
Bash
Executable file
30 lines
519 B
Bash
Executable file
#!/bin/sh
|
|
|
|
VERSION="1.9.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
|