Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nix-community/patsh
A command-line tool for patching shell scripts inspired by resholve [maintainer=@figsoda]
https://github.com/nix-community/patsh
bash dependencies dependency nix nixpkgs patch patchelf rust shell
Last synced: about 11 hours ago
JSON representation
A command-line tool for patching shell scripts inspired by resholve [maintainer=@figsoda]
- Host: GitHub
- URL: https://github.com/nix-community/patsh
- Owner: nix-community
- License: mpl-2.0
- Created: 2022-11-26T03:13:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T11:25:23.000Z (6 months ago)
- Last Synced: 2024-10-29T16:03:43.326Z (15 days ago)
- Topics: bash, dependencies, dependency, nix, nixpkgs, patch, patchelf, rust, shell
- Language: Rust
- Homepage:
- Size: 255 KB
- Stars: 49
- Watchers: 4
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# patsh
[![version](https://img.shields.io/crates/v/patsh?logo=rust&style=flat-square)](https://crates.io/crates/patsh)
[![deps](https://deps.rs/repo/github/nix-community/patsh/status.svg?style=flat-square&compact=true)](https://deps.rs/repo/github/nix-community/patsh)
[![license](https://img.shields.io/badge/license-MPL--2.0-blue?style=flat-square)](https://www.mozilla.org/en-US/MPL/2.0)
[![ci](https://img.shields.io/github/actions/workflow/status/nix-community/patsh/ci.yml?label=ci&logo=github-actions&style=flat-square)](https://github.com/nix-community/patsh/actions?query=workflow:ci)A command-line tool for patching shell scripts inspired by [resholve](https://github.com/abathur/resholve)
```sh
nix run github:nix-community/patsh -- -f script.sh
```## Usage
```
Usage: patsh [OPTIONS] [OUTPUT]Arguments:
the file to be patched
[OUTPUT] output path of the patched file, defaults to the input path, however, --force is required to patch in placeOptions:
-b, --bash bash command used to list the built-in commands [default: bash]
-f, --force remove existing output file if needed
-p, --path use something other than the PATH variable for path resolution
-s, --store-dir path to the nix store, e.g. `builtins.storeDir` [default: /nix/store]
-h, --help Print help information
-V, --version Print version information
```## TODO
- ansi-c quoting
- resolving variables
- diagnostics for unresolved commands## Changelog
See [CHANGELOG.md](CHANGELOG.md)