Crates.io | shell2bin |
lib.rs | shell2bin |
version | 2.0.0 |
source | src |
created_at | 2022-11-06 21:25:53.20864 |
updated_at | 2022-11-06 21:28:07.350194 |
description | A tool for converting shell scripts to executables |
homepage | https://github.com/bennett-sh/shell2bin |
repository | https://github.com/bennett-sh/shell2bin |
max_upload_size | |
id | 706753 |
size | 8,461 |
shell2bin <script> [<output name without extension>]
cargo install shell2bin
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!")
Currently, there are no issues known. Feel free to report any issues using the Issues-tab.