-
-
Notifications
You must be signed in to change notification settings - Fork 159
/
INSTALL.txt
129 lines (82 loc) · 2.57 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Building and Installing Oils
============================
Oils is a new Unix shell. This file describes how to configure, build, and
install it from source code.
Quick Start
-----------
If you haven't already done so, extract the tarball:
tar -x --gz < oils-for-unix-0.24.0.tar.gz
cd oils-for-unix-0.24.0
This is the traditional way to install it:
./configure # completes very quickly
_build/oils.sh # 30-60 seconds
sudo ./install
You'll end up with an oils-for-unix binary and two symlinks:
/usr/local/bin/
oils-for-unix
osh -> oils-for-unix
ysh -> oils-for-unix
This structure is similar to the busybox tool.
Smoke Test
----------
OSH behaves like a POSIX shell:
$ osh -c 'echo hi'
hi
The -n flag parses and prints a syntax tree for the 'configure' script:
osh -n configure
YSH is a legacy-free shell, with structured data:
$ ysh -c 'echo hi'
hi
$ ysh -c 'json write ({x: 42})'
{
"x": 42
}
More Documentation
------------------
Every release has a home page with links:
https://oilshell.org/release/0.24.0/
System Requirements
-------------------
Oils is designed to have very few dependencies. You need:
- A C++11 compiler
- with libc and libstdc++
- A POSIX shell to invoke _build/oils.sh
Optional:
- GNU readline library, for interactive features
(https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)
Build deps on Debian-like distros, including Ubuntu:
sudo apt-get install build-essential libreadline-dev
Alpine Linux:
apk add libc-dev gcc readline-dev
Oils has been tested on several Linux distros and OS X. It aims to run on any
POSIX system. If it doesn't, file a bug here:
https://github.com/oilshell/oil/issues
Non-root Install
----------------
You can run the binary in-place, e.g.
$ _bin/cxx-opt-sh/osh -c 'echo hi'
hi
Or you can install into ~/bin, with the man page at
~/.local/share/man/man1/osh.1:
./configure --prefix ~ --datarootdir ~/.local/share
_build/oils.sh
./install
This doesn't require root access, but it requires:
- ~/bin to be in your $PATH
- Pages under ~/.local/share/man to be found by 'man'. (See manpath or
$MANPATH.)
NOTE: Out-of-tree builds are NOT currently supported, so you have to be in the
oils-for-unix-0.24.0 directory.
Build Options
-------------
Show options with:
./configure --help
Common flags:
--prefix
--with-readline
--without-readline
--readline # the location
Links
-----
- Notes on portability:
https://oilshell.org/release/0.24.0/doc/portability.html