Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esy/esy-bash
Installation utilities for Cygwin - primed for Reason/OCaml
https://github.com/esy/esy-bash
bash cross-platform cygwin cygwin-installation esy ocaml reasonml
Last synced: 4 months ago
JSON representation
Installation utilities for Cygwin - primed for Reason/OCaml
- Host: GitHub
- URL: https://github.com/esy/esy-bash
- Owner: esy
- License: mit
- Created: 2018-06-22T22:51:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T03:38:00.000Z (8 months ago)
- Last Synced: 2024-10-07T01:35:35.823Z (4 months ago)
- Topics: bash, cross-platform, cygwin, cygwin-installation, esy, ocaml, reasonml
- Language: JavaScript
- Size: 638 KB
- Stars: 12
- Watchers: 6
- Forks: 3
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esy-bash
[![Build Status](https://bryphe.visualstudio.com/esy-bash/_apis/build/status/bryphe.esy-bash)](https://bryphe.visualstudio.com/esy-bash/_build/latest?definitionId=7)
[![npm version](https://badge.fury.io/js/esy-bash.svg)](https://badge.fury.io/js/esy-bash)Installation utilities for a bash environment - primed for Reason/OCaml
This package is intended to smooth over cases where OCaml packages rely on Unix utilities or a Bash environment.
On Linux and OS X, this package is essentially a no-op. On Windows, we install an isolated `cygwin` environment, ready to use for OCaml/OPAM, that we use to run a bash shell.
## Installation
```
npm install
```Installation on Windows does the following:
- Downloads `cygwin` into a `.cygwin` folder
- Installs various utilities required on `cygwin` for OCaml & Reason - `rsync`, `patch`, `mingw`, etc.
- Sets up OPAM to point to the Windows repository: https://github.com/fdopen/opam-repository-mingw/## Usage
### Command Line
The __`esy-bash`__ command runs a script in a bash shell. On Linux and OS X, this just uses the default `bash` shell. On Windows, this delegates to the installed `cygwin` environment:
```
esy-bash echo 'HI'
```### API
An API is also bundled:
```
const { bashExec } = require("esy-bash")await bashExec("ls -a")
```## License
This source code is licensed under the [MIT License](./LICENSE).
When installing, several other dependencies are downloaded - like Cygwin and the GNU utilities. These are bound by their own license terms, primarily the [GPL License](https://en.wikipedia.org/wiki/GNU_General_Public_License)