-
-
Notifications
You must be signed in to change notification settings - Fork 103
/
INSTALL
92 lines (63 loc) · 2.79 KB
/
INSTALL
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
gitsh installation
==================
The ideal way to install gitsh is via your operating system's package manager.
Currently gitsh packages are available for:
* macOS (via Homebrew)
* Arch Linux
* OpenBSD (-current)
On other operating systems you should install using the tarball, following the
instructions in this guide.
Prerequisites
-------------
* Ruby version 2.3.0 or later
* gcc or a similar C compiler
* GNU Readline
gitsh and Ruby version managers
-------------------------------
The gitsh configuration script will attempt to find a system wide version of
Ruby 2.3.0 or later. Rubies installed by Ruby version managers will usually be
ignored to avoid problems when those binaries are moved or deleted.
To force gitsh to use a specific Ruby binary, set the $RUBY environment variable
when running the configuration script. For example, this will use the first ruby
binary on the $PATH:
RUBY=$(which ruby) ./configure
GNU Readline
------------
gitsh provides a Ruby C extension that integrates with GNU Readline. Ruby ships
with its own Readline module, but it doesn't offer all of the features required
for comprehensive tab-completion.
Other line editor libraries, like libedit, are partly compatible with GNU
Readline, but don't offer enough features to be supported by gitsh.
The configure script may fail if GNU Readline isn't found. You can set the
$CPPFLAGS and $LDFLAGS environment variables to provides paths for the compiler
and linker to use. For example, with GNU Readline install under /usr/local/opt,
you might use:
CPPFLAGS="-I/usr/local/opt/readline/include" \
LDFLAGS="-L/usr/local/opt/readline/lib" \
./configure
If your system uses a different name for Readline, you can set the
$READLINE_LIB environment variable. For example, on OpenBSD where the Readline
library is named ereadline, you might use:
READLINE_LIB="ereadline" \
CPPFLAGS="-I/usr/local/include/ereadline" \
LDFLAGS="-L/usr/local/lib" \
./configure
Finally, on macOS systems with a universal Ruby binary (e.g. /usr/bin/ruby),
and a non-universal Readline shared library, you may need to explicitly pass
an architecture to use via the $READLINE_ARCH environment variable:
READLINE_ARCH=x86_64 \
RUBY=/usr/bin/ruby \
./configure
Installation
------------
1. Download and extract the latest release:
curl -OL https://github.com/thoughtbot/gitsh/releases/download/v0.14/gitsh-0.14.tar.gz
tar -zxvf gitsh-0.14.tar.gz
cd gitsh-0.14
2. Configure the distribution. This step will determine which version of Ruby
should be used, which has important implications; see the notes on "gitsh and
Ruby version managers" above.
./configure
3. Build and install gitsh:
make
sudo make install