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

129 lines, 82 significant
1Building and Installing Oils
2============================
3
4Oils is a new Unix shell. This file describes how to configure, build, and
5install it from source code.
6
7Quick Start
8-----------
9
10If you haven't already done so, extract the tarball:
11
12 tar -x --gz < oils-for-unix-0.24.0.tar.gz
13 cd oils-for-unix-0.24.0
14
15This is the traditional way to install it:
16
17 ./configure # completes very quickly
18 _build/oils.sh # 30-60 seconds
19 sudo ./install
20
21You'll end up with an oils-for-unix binary and two symlinks:
22
23 /usr/local/bin/
24 oils-for-unix
25 osh -> oils-for-unix
26 ysh -> oils-for-unix
27
28This structure is similar to the busybox tool.
29
30Smoke Test
31----------
32
33OSH behaves like a POSIX shell:
34
35 $ osh -c 'echo hi'
36 hi
37
38The -n flag parses and prints a syntax tree for the 'configure' script:
39
40 osh -n configure
41
42YSH is a legacy-free shell, with structured data:
43
44 $ ysh -c 'echo hi'
45 hi
46
47 $ ysh -c 'json write ({x: 42})'
48 {
49 "x": 42
50 }
51
52More Documentation
53------------------
54
55Every release has a home page with links:
56
57 https://oilshell.org/release/0.24.0/
58
59System Requirements
60-------------------
61
62Oils is designed to have very few dependencies. You need:
63
64 - A C++11 compiler
65 - with libc and libstdc++
66 - A POSIX shell to invoke _build/oils.sh
67
68Optional:
69
70 - GNU readline library, for interactive features
71 (https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)
72
73Build deps on Debian-like distros, including Ubuntu:
74
75 sudo apt-get install build-essential libreadline-dev
76
77Alpine Linux:
78
79 apk add libc-dev gcc readline-dev
80
81Oils has been tested on 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
86Non-root Install
87----------------
88
89You can run the binary in-place, e.g.
90
91 $ _bin/cxx-opt-sh/osh -c 'echo hi'
92 hi
93
94Or you can install into ~/bin, with the man page at
95~/.local/share/man/man1/osh.1:
96
97 ./configure --prefix ~ --datarootdir ~/.local/share
98 _build/oils.sh
99 ./install
100
101This doesn't require root access, but it requires:
102
103- ~/bin to be in your $PATH
104- Pages under ~/.local/share/man to be found by 'man'. (See manpath or
105 $MANPATH.)
106
107NOTE: Out-of-tree builds are NOT currently supported, so you have to be in the
108oils-for-unix-0.24.0 directory.
109
110Build Options
111-------------
112
113Show options with:
114
115 ./configure --help
116
117Common flags:
118
119 --prefix
120 --with-readline
121 --without-readline
122 --readline # the location
123
124Links
125-----
126
127- Notes on portability:
128 https://oilshell.org/release/0.24.0/doc/portability.html
129