#shell #script #executable #language #sh #scripting-language #bat

app shell2bin

A tool for converting shell scripts to executables

2 releases (1 stable)

2.0.0 Nov 6, 2022
0.1.0 Nov 6, 2022

#3 in #bat

Download history 12/week @ 2024-02-22 8/week @ 2024-02-29 28/week @ 2024-03-07 9/week @ 2024-03-14

57 downloads per month

MIT license

6KB
99 lines

🐚 shell2bin

A simple program to package shell scripts (sh, bat, ...) as executables

✏️ Usage

shell2bin <script> [<output name without extension>]

📦 Requirements

  • Rust (with cargo & rustc in path)

💠 Installation

  1. Install requirements
  2. Run cargo install shell2bin
  3. Profit.

📂 Supported languages

Most script languages should be supported when installed. You will need to specify the language using either a shebang or using a S2B-annotation. Both shebangs and S2B-annotations must be on the first line of the file. The only exception to this are batch files. Here you can add an @echo off on the line before a S2B-annotation. The syntax of S2B-annotations is the following: [Line comment in language; supported: #, "rem " and //]S2B:[program] [<args>]

Examples:

#!/bin/bash
ls
@echo off
rem S2B:cmd.exe /C
ls
rem S2B:cmd.exe /C
ls
#S2B:python
print("Hello world!")

🐛 Known Issues

Currently, there are no issues known. Feel free to report any issues using the Issues-tab.

Dependencies

~2–11MB
~114K SLoC