Determining which language the user selected when cloning from Github


How can I run a script that depends on the language the user selected when cloning from Github?

I have this repo: GitHub - chrisguida/cln-plugin-tutorial: A tutorial for creating and testing CLN plugins

Which consists of the same tutorial in two different languages (Python and Rust)

I’d like to be able to rename the .tutorial-rust (or .tutorial-python) directory to .tutorial, which becomes the official tutorial, as soon as the user creates the repl from cloning this git repo.

I tried using REPL_LANGUAGE, but that appears to be nix no matter which language I select. Is there some other env var or config setting I can read in order to determine which language the user has selected? That way I can auto-rename the tutorial for them (in an onBoot script) and the tutorial they see is for the language they selected.

Repl link/Link to where the bug appears:
Any repl created from the above git repo, I currently have one here


onBoot runs a script when the repl starts

I’d rather not split it into separate repos for each language because that requires 2x the work for everything.

I want to add more languages too, and obviously this would only multiply the work further.