-
Notifications
You must be signed in to change notification settings - Fork 10
Compiling and running
This page documents the jsh
build process. Note you can download pre-built binaries for all official jsh
releases. Building jsh
yourself should work fine too. jsh
has been written with portability in mind. It should run on any POSIX compliant OS. We successfully compiled the shell for various platforms, including GNU/Linux (Arch, Ubuntu, TinyCore, Fedora), Mac OS X and BSD UNIX (FreeBSD).
This page provides a step-by-step guide for compiling jsh
If you run into problems compiling jsh
for your platform, let us know. If you tested jsh
for another platform, feel free to edit/enhance the the platform dependent instructions below.
This section lists the general platform-independent steps to build jsh
yourself.
-
Clone this repository and change the directory:
$ git clone git@github.com:jovanbulck/jsh.git $ cd jsh
-
Resolve the dependencies: see the next sections for platform-dependent instructions and dependencies.
-
Build a
jsh
binary in the current directory. Either:
-
Execute the Makefile with
make
. If desired, install ajsh
binary in/usr/local/bin/
andman
page in/usr/local/share/man/man1/
using theinstall
target:$ make $ sudo make install
-
Alternatively, use the graphical
dialog
based installer that walks you through the installation procedure, offering you various ways of tweaking yourjsh
installation:$ ./installer.sh
- Done! You should now have a working binary of
jsh
. Execute with./jsh
.
Note that debugging output is turned on by default in non-release non-install developer builds. To disable it, do one of the following:
- type
debug off
- run
./jsh
with the--nodebug
option - compile with debugging off:
$ make EXTRA_CFLAGS=-DNODEBUG
- include the line "
debug off
" in~/.jshrc
The following table lists the dependencies needed to succesfully build jsh
:
Dependency | Rationale | Where to get it |
---|---|---|
GNU Readline |
jsh uses the readline library for user input line editing, autocompletion and command history. |
The following section lists platform specific info to resolve the libreadline dependency. |
GNU Make | The Makefile uses some GNU Make specific features. |
Most operating systems provide make in the standard package manager. Note BSD provides its own (incompatible) version of make . See below. |
dialog | The dialog utility displays in-terminal dialog boxes. It is only needed if you want to use the installer shell script. |
Normally it is pre-installed on a GNU/Linux or BSD system. If not, see below. Note that Mac OS X doesn't provide the tool as far as we know. |
basic UNIX utilities: install , uname , date , sed
|
Theses utilites are used by the Makefile during the build process |
Getting these utilites should be no problem, as they are widely available and installed on any basic UNIX system. |
This section lists all platform-dependent instruction for the jsh
build process. Feel free to edit if you want to add/enhance instructions.
Install the necessary packages:
$ sudo pacman -S --needed base-devel readline
Install the necessary packages:
$ sudo apt-get install build-essential libreadline6-dev
Currently, the provided binaries fail to run for Tiny Core Linux. You have to compile it yourself. Install the necessary packages:
$ tce-load -wi git ncurses compiletc readline-dev
###Fedora 22 and later versions Install the necessary packages:
$ sudo dnf update
$ sudo dnf install git gcc readline-devel
For the dialog dependency install:
$ sudo dnf install dialog-devel
- Install
gmake
(GNU make) andgcc
packages withpkg install
- Readline should work now; if not try installing
readline
and/orbash
- always use
gmake
instead ofmake
- Change the line "CC = gcc" to "CC = gcc48" in the Makefile
- Install command line developing tools (
gcc
,make
, ...):
- option 1: install Xcode via the Mac App store
- option 2: only install the command line tools, using this github project
- Point to right readline library:
-
Install newest readline library via Homebrew or Macports:
$ brew install readline
-
Make sure there's a symbolic link in
/usr/local/lib
to thehomebrew
installation lib directory. If not add one manually:$ ln -s /usr/local/lib/readline /usr/local/Cellar/readline/VERSION_NUMBER/lib/readline
-
Alternatively, change the relevant line in the
Makefile
using -L to specify the homebrew installation lib directory instead of/usr/local/lib
:
```make
ifeq ($(UNAME_S), Darwin)
# link explicitely with readline library folder
# for Mac OS X (installed with homebrew)
LINK = $(LN) -L/usr/local/Cellar/readline/VERSION_NUMBER/lib/readline
```
- Compile with the
make
command
Home | Installation | Configuration | Manual | Contributing