File: git-extras

package info (click to toggle)
git-extras 1.7.0-1.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 696 kB
  • sloc: sh: 381; makefile: 52
file content (30 lines) | stat: -rwxr-xr-x 565 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

VERSION="1.7.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
    ;;
  *)
    test "$INSTALL" = "y" && update && exit
    man git-extras
    ;;
esac