tdenniston / bish

Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
MIT License
1.48k stars 36 forks source link

Can bish use raw shell include files? #48

Open Icenowy opened 9 years ago

Icenowy commented 9 years ago

I want to use bish to partly rewrite https://github.com/AOSC-Dev/autobuild3 (The build tool of my Linux distro)

However, autobuild3 is modular and has many written bash routines.

How can I use them in bish?

PS: I don't like the generating style of bish -- It's not modular at all.

tdenniston commented 9 years ago

Can you explain a little bit more what you are trying to do? Do you want to execute external bash scripts, or call functions from a bish script that are defined in an external bash script?

The code generation strategy I'm using for modular bish programs was deliberate: everything is statically linked so that a multi-part bish program can be generated and distributed as a single bash script. However, I'm open to change, if you can give a good argument why it should be different :-).

Artoria2e5 commented 9 years ago

autobuild3 is a set of scripts that we use to build software packages in our linux distribution. It is quite a modular system (find -type f . | wc -l says so) and contains a lot of source or . commands. Some parts of autobuild are also used in other scripts and that's why Icenowy wants to include compile-as-library and raw source stuffs.