https://github.com/kira-nt/slurp
👅 Slurp your files into a single binary
https://github.com/kira-nt/slurp
linux self-executable self-extracting
Last synced: 7 months ago
JSON representation
👅 Slurp your files into a single binary
- Host: GitHub
- URL: https://github.com/kira-nt/slurp
- Owner: Kira-NT
- License: mit
- Created: 2025-03-29T19:12:04.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-30T13:23:32.000Z (10 months ago)
- Last Synced: 2025-05-12T08:35:54.373Z (9 months ago)
- Topics: linux, self-executable, self-extracting
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# slurp
[](https://github.com/Kira-NT/slurp/releases/latest)
[](LICENSE.md)
`slurp` is a simple tool that can help you pack an executable along with its satellite files *(such as libraries, configuration files, etc.)* into a single binary.
----
## Installation
`slurp` does not require installation in the traditional sense, since it's just a standalone shell script. Therefore, you have several options for integrating it into your system:
- **Direct Download:**
Download the `slurp` file from the [latest release](https://github.com/Kira-NT/slurp/releases/latest), place it in a directory that is in your system's `PATH`, grant it executable permissions, and run it:
```sh
chmod +x slurp
slurp [options]
```
- **Clone and Run:**
Clone the repository and run `slurp.sh` directly from the working tree:
```sh
git clone https://github.com/Kira-NT/slurp
cd slurp
./slurp.sh [options]
```
- **Run Without Saving:**
If you only need `slurp` for a single task, you can run it without permanently saving the script by using the following snippet:
```sh
curl -Ls https://github.com/Kira-NT/slurp/blob/HEAD/slurp.sh?raw=true | bash -s -- [options]
```
Note, `slurp` and the binaries it produces depend on [GNU `coreutils`](https://www.gnu.org/software/coreutils/). Hence, it will only work on macOS, FreeBSD, and other Unix-like systems outside of the Linux ecosystem if `coreutils` have been manually installed there by the user.
----
## Usage
```
Usage: slurp [-r ] [-o ] [--]
slurp --unpack [-o ] [--]
Slurp an executable and its satellite files into a single binary.
Examples:
slurp ./bin/ --run ./bin/autorun.sh --output ./app
slurp ./bin/ --output ./app
slurp ./bin/
slurp ./app --unpack --output ./app.slurp/
slurp ./app --unpack
Arguments:
The directory containing the files and subdirectories to be slurped.
The binary file to be unslurped.
Options:
-h, --help
Displays this help page.
-v, --version
Displays the application version.
-r, --run
Specifies the primary executable file within the input directory.
If omitted, slurp will attempt to locate one by searching for it in the following order:
1. An executable named "autorun"
2. An executable named "autorun.sh"
3. A sole executable file in the root of the input directory
(if the search yields zero or multiple results, no match is made).
-o, --output
Specifies the name of the resulting binary.
If omitted, the binary name is derived automatically from the main executable:
- The main executable's basename is used, unless it is "autorun".
- If the main executable's basename is "autorun", the name of the input directory is used.
- A numeric suffix (e.g., ".1", ".2", etc.) is appended if the chosen filename is already in use.
-o, --output
Specifies the name of the output directory.
If omitted, defaults to ".slurp".
-u, --unpack, --unslurp
Unpack a binary created by slurp.
```
----
## License
Licensed under the terms of the [MIT License](LICENSE.md).