| Crates.io | shrup |
| lib.rs | shrup |
| version | 0.1.0 |
| created_at | 2025-08-20 18:51:36.7754+00 |
| updated_at | 2025-08-20 18:51:36.7754+00 |
| description | A shell script preprocessor |
| homepage | |
| repository | https://github.com/kp63/shrup |
| max_upload_size | |
| id | 1803811 |
| size | 92,336 |
Simple, Fast, Lightweight shell script preprocessor
自分用に作成したシェルスクリプト作成支援ツールです。
C言語のプリプロセッサーのように、ファイル内の#includeディレクティブを解決して結合できます。
一応シェルスクリプト以外でも使えます。

--debugでincludeコメント表示)#include <file> → ファイルを解決して結合shrup input.sh output.sh [--debug] [--max-depth N]
# --debug, -d → デバッグモード(includeの情報を出力に含める)
cargo build --release
# バイナリは target/release/shrup に生成されます
cargo test
#include <utils/functions.sh> # 山括弧
#include "config/settings.sh" # ダブルクオート
#include 'helpers/logger.sh' # シングルクオート
#include common.sh # クオートなし
MIT License