Using a simple wrapper script called turtle
allows your Turtle shell programs to execute with a simple shebang. Nix will take care of installing the necessary dependencies if you don’t have them already.
$ source scripts/env
or simply:
$ PATH=$PWD/scripts:$PATH
or use direnv:
$ direnv allow
$ examples/hello-turtle
Turtle
#!/usr/bin/env turtle
main = echo "Hello, Turtle!"
- Gabriel’s original blog post, Use Haskell for shell scripting
- Turtle on hackage
- Turtle on GitHub
- The Turtle Tutorial