OILS / INSTALL.txt View on Github | oilshell.org

97 lines, 61 significant
1Building and Installing OSH
2===========================
3
4OSH is a bash-compatible shell and is part of the Oil project
5(http://www.oilshell.org).
6
7This file describes how to configure, build, and install it from source code.
8
9Quick Start
10-----------
11
12If you haven't already done so, extract the tarball:
13
14 tar -x --xz < oil-0.21.0.tar.xz
15 cd oil-0.21.0
16
17Either install as /usr/local/bin/osh:
18
19 ./configure # completes very quickly
20 make # 30-60 seconds
21 sudo ./install
22
23or install as ~/bin/osh and the man page as ~/.local/share/man/man1/osh.1:
24
25 ./configure --prefix ~ --datarootdir ~/.local/share
26 make
27 ./install
28
29The latter doesn't require root access, but it requires:
30
31- ~/bin to be in your $PATH
32- Pages under ~/.local/share/man to be found by 'man'.
33 (See manpath or $MANPATH.)
34
35NOTE: Out-of-tree builds are NOT currently supported, so you have to be in the
36oil-0.21.0 directory.
37
38Smoke Test
39----------
40
41OSH behaves like a POSIX shell:
42
43 $ osh -c 'echo hi'
44 hi
45
46This parses and prints a syntax tree for the 'configure' script.
47
48 osh -n configure
49
50More Documentation
51------------------
52
53Every release has a home page with links, e.g.
54
55 https://oilshell.org/release/0.21.0/
56
57System Requirements
58-------------------
59
60Roughly speaking, you need:
61
62 - an ANSI C environment (compiler and libc)
63 - GNU Bash
64 - GNU Make.
65
66(I want to remove the GNU requirements and require only POSIX sh instead).
67
68Optional:
69
70 - GNU readline library, for interactive features
71 (https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)
72
73Debian/Ubuntu and derivatives:
74
75 sudo apt install build-essential libreadline-dev
76
77Alpine Linux:
78
79 apk add libc-dev gcc bash make readline-dev
80
81OSH has been tested in several Linux distros and OS X. It aims to run on any
82POSIX system. If it doesn't, file a bug here:
83
84 https://github.com/oilshell/oil/issues
85
86Build Options
87-------------
88
89./configure --help will show the options. Right now, the only significant
90options are --prefix and --{with,without}-readline.
91
92Notes
93-----
94
95- The oil.ovm executable behaves like busybox, and osh is a symlink to it.
96- Oil contains a fork of the Python 2.7 runtime, so it should compile with most
97 popular compiler/OS combinations.