mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
22 lines
455 B
Bash
Executable file
22 lines
455 B
Bash
Executable file
#!/bin/sh
|
|
|
|
VERSION="0.4.1"
|
|
|
|
update() {
|
|
local orig=$PWD
|
|
cd /tmp \
|
|
&& rm -fr ./git-extras \
|
|
&& git clone --depth 1 http://github.com/visionmedia/git-extras.git \
|
|
&& cd git-extras \
|
|
&& make install \
|
|
&& cd $orig \
|
|
&& echo "... updated git-extras $VERSION -> $(git extras --version)"
|
|
}
|
|
|
|
test "$INSTALL" = "y" && update && exit
|
|
|
|
case "$1" in
|
|
-v|--version) echo $VERSION && exit 0 ;;
|
|
update) update ;;
|
|
*) man git-extras ;;
|
|
esac |