File: install.sh

package info (click to toggle)
git-extras 6.1.0-1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 1,720 kB
  • sloc: sh: 3,480; makefile: 126
file content (22 lines) | stat: -rwxr-xr-x 520 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
#!/usr/bin/env bash

make_install() {
    if [ -n "$PREFIX" ]
    then
        PREFIX="$PREFIX" make install
    else
        sudo make install
    fi
}

dir=$(mktemp -t -d git-extras-install.XXXXXXXXXX) \
    && cd "$dir" \
    && echo "Setting up 'git-extras'...." \
    && git clone https://github.com/tj/git-extras.git &> /dev/null \
    && cd git-extras \
    && git checkout \
        $(git describe --tags $(git rev-list --tags --max-count=1)) \
        &> /dev/null \
    && make_install \
    && rm -rf "$dir"