Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation: put $SYSCONFDIR (etc) under $PREFIX by default #490

Merged
merged 1 commit into from
Dec 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions Installation.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
## Debian
# Installing git-extras

## Installing with a package manager

### Debian

```bash
$ sudo $apt_pref update
$ sudo $apt_pref install git-extras
```

## Mac
### Mac OS X with Homebrew

```bash
$ brew install git-extras
```

## Clone / Tarball:
## Building from source

Obtain the git-extras source by cloning [its GitHub repo](https://github.com/tj/git-extras.git) or downloading a tarball of a [release](https://github.com/tj/git-extras/releases). Then install it by doing `make install` from the source tree.

```bash
$ git clone https://github.com/tj/git-extras.git
Expand All @@ -21,12 +27,41 @@ $ git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
$ [sudo] make install
```

By default, git-extras is installed under `/usr/local`. To install it at an
alternate location, specify a `PREFIX` when calling `make`.

```bash
# Non-root users can install under their home directory
make install PREFIX=$HOME/software

# For third-party software kept under /opt
make install PREFIX=/opt
```

If you want to relocate the bulk of the installation but still have configuration
files installed to the system `/etc` dir or other alternate location, you can
specify `SYSCONFDIR` in addition to `PREFIX`.

```
$ sudo make install PREFIX=/usr/local SYSCONFDIR=/etc
```

See the Makefile for details on advanced configuration options.

## Installing from network

One-liner:

```bash
curl -sSL http://git.io/git-extras-setup | sudo bash /dev/stdin
```

## Updating

If you installed git-extras with a package manager, use that package manager's tools to update it.

If you installed git-extras from source, you can run `git-extras update` to update it to the latest release. Be aware that this may lose any configuration options you specified during the original installation.

## Windows (use it at your own risk)

First, please install `Git for Windows 2.x` from 'https://github.com/git-for-windows/git/releases'
Expand All @@ -48,6 +83,7 @@ install.cmd "C:\SCM\PortableGit\mingw64"

Last, please copy `colrm.exe` and `column.exe` from `folder-your-msys2-installed/usr/bin` to
`folder-your-git-installed/usr/bin`.

Enjoy `git-extras`!

[1]: http://sourceforge.net/projects/msys2/
[1]: http://sourceforge.net/projects/msys2/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PREFIX ?= /usr/local
BINPREFIX ?= "$(PREFIX)/bin"
MANPREFIX ?= "$(PREFIX)/share/man/man1"
SYSCONFDIR ?= /etc
SYSCONFDIR ?= $(PREFIX)/etc
BINS = $(wildcard bin/git-*)
MANS = $(wildcard man/git-*.md)
MAN_HTML = $(MANS:.md=.html)
Expand Down