Shabakka

..

DRAFT.

Idea - an intermediate representation as a bridge between babashka and bash

Functionality

  1. Load bash script into IR
  2. Load babashka script into IR
  3. Write IR to bash script
  4. Write IR to babashka script

Motivation

Ease migration from bash to babashka.

Strategy

Middle-out – support a small subset of bash and babashka (starting out)

When hitting something we don’t support native translation for, shell out to either babashka or bash.

Platform

Fast shell script with CLI

Online converter

Option: other shells too

Once we have an IR, we could support other platforms. For the whole IR, or for parts of it. When we hit stuff we don’t understand, we can produce a comment. In the IR, we can represent “don’t understand” explicitly. Or just as a comment there too. Converting the “unsupported comment” back should work fine.

Appendix

2022-08-27

I think simply collecting some kind of bash/babashka rosetta might be a good way to start. And the place for that rosetta is … here! This page is the deliverable. There’s always a deliverable.