forked from oils-for-unix/oils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
95 lines (61 loc) · 2.03 KB
/
INSTALL.txt
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
93
94
Building and Installing OSH
===========================
OSH is a bash-compatible shell, and is part of the Oil project
(http://www.oilshell.org).
This file describes how to install OSH. (It's in the release tarball and also
published on the web.)
Quick Start
-----------
If you haven't already done so, extract the tarball:
tar -x --xz < oil-0.6.pre16.tar.xz
cd oil-0.6.pre16
Either install as /usr/local/bin/osh:
./configure # completes very quickly
make # 30-60 seconds
sudo ./install
or install as ~/bin/osh:
./configure --prefix ~
make
./install
The latter doesn't require root access, but it requires ~/bin to be in your
PATH.
NOTE: Out-of-tree builds are NOT currently supported, so you have to be in the
oil-0.6.pre16 directory.
Smoke Test
----------
OSH behaves like a POSIX shell:
$ osh -c 'echo hi'
hi
This parses and prints a syntax tree for the 'configure' script.
osh -n configure
System Requirements
-------------------
Roughly speaking, you need:
- an ANSI C environment (compiler and libc)
- GNU Bash
- GNU Make.
(I want to eventually remove the GNU requirements and require just POSIX sh
instead).
Optional:
- GNU readline library, for interactive features
(https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)
Debian/Ubuntu and derivatives:
sudo apt install build-essential libreadline-dev
Alpine Linux:
apk add libc-dev gcc bash make readline-dev
OSH hasn't been tested on non-Linux systems, but eventually it should run on
any POSIX-compatible system.
Build Options
-------------
./configure --help will show the options. Right now, the only significant
options are --prefix and --{with,without}-readline.
Notes
-----
- The oil executable behaves like busybox, and osh is a symlink to it. Compare
oil --help vs. osh --help.
- OSH uses a slight fork of the Python 2.7 runtime, so it should
compile with most popular compiler/OS combinations.
TODO
----
- Add back build support for PGO and LTO and document them. (CPython has
this.)