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