https://github.com/h2non/nar-installer
Simple Bash script to easily install nar executable packages. Analog to npm install --global
https://github.com/h2non/nar-installer
Last synced: 5 months ago
JSON representation
Simple Bash script to easily install nar executable packages. Analog to npm install --global
- Host: GitHub
- URL: https://github.com/h2non/nar-installer
- Owner: h2non
- Created: 2015-02-26T10:44:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-02T11:57:24.000Z (over 10 years ago)
- Last Synced: 2024-10-18T11:26:17.869Z (8 months ago)
- Language: Shell
- Homepage:
- Size: 164 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [nar](https://github.com/h2non/nar)-installer
Dead simple Bash script to download and install [nar](https://github.com/h2non/nar) self-contained executable packages in a similar way like npm does via `npm install --global`
Useful to provide an easy-to-use one-command installer solution for your applications
Works in GNU/Linux, OSX and SunOS. Requires `curl`
## Generate binaries
Create `nar` executable archives of your package for multiple platforms:
```bash
nar --executable --os linux --arch x64
nar --executable --os darwin --arch x64
```Then you can upload the `nar` archives to a Github tag, S3 or whatever you want
## CLI
Arguments
```bash
./installer.sh [flags]
```Supported flags
```bash
-f, --force - Force package installation, removing old installations
-p, --path - Installation path. Default to ~/.npm or ~/
```## Usage
Fetch the installer script:
```bash
curl -O -L -k https://raw.githubusercontent.com/h2non/nar-installer/master/installer.sh
```Open `installer.sh` in your favorite editor and customize the following values:
```bash
NAME="project-name"
URL="https://github.com/you/$NAME/releases/download/$VERSION/$NAME-$VERSION"
```Save your changes and simply run the script to install your package.
Example downloading the installer script and running it:
```bash
curl -L https://github.com/you/project/tree/installer.sh | sudo bash 0.1.0
```## Examples
Projects using `nar-installer`:
- [Apitance](https://github.com/h2non/apitance)
## License
WTFPL