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.md: add dependencies section. #765

Merged
merged 2 commits into from
Jun 30, 2019
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
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
os:
- linux
- osx
addons:
apt:
packages:
- bsdmainutils
script:
- ./check_integrity.sh $(find bin | cut -b 5- | xargs)
# Test for the brew release
Expand Down
11 changes: 11 additions & 0 deletions Installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Installing git-extras

## Dependencies

Some commands require extra dependencies which are unavailable in some platforms.
You may need to install them manually.

Those dependencies are listed below:

* column

## Installing with a package manager

### Debian
Expand Down Expand Up @@ -84,6 +93,8 @@ Use the instructions to build from source below. Make sure you are using `gmake`

## Building from source

Read [Dependencies](#dependencies) and ensure they are installed.

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
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ default: install

docs: $(MAN_HTML) $(MAN_PAGES)

install:
check:
@echo "Check dependencies before installation"
@./check_dependencies.sh
@echo

install: check
@if [ "$(INSTALL_VIA)" = brew ]; then \
git apply brew-release.patch || { echo "Can't apply brew release patch"; exit 1; } \
fi
Expand Down Expand Up @@ -120,4 +125,4 @@ docclean:
rm -f man/*.1
rm -f man/*.html

.PHONY: default docs clean docclean install uninstall
.PHONY: default docs clean docclean check install uninstall
10 changes: 10 additions & 0 deletions check_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

err() {
echo >&2 "$1"
exit 1
}

if ! test "$(which column)"; then
err "Need to install dependency 'column' before installation"
fi