At the moment I'm developing a larger Bash script (it's an Open Source project of mine) and it's starting to become a mess. I've split up logic into functions, use local variables where I can and have only declared a handful global variables. Still, it is becoming pretty hard to maintain.
I thought about splitting the script up into multiple scripts and source them in my main script (similar to imports in other languages).
But I wonder if this is a feasible approach. First, sourcing multiple scripts could severly slow the execution time of the script, and second, it makes distribution harder.
So, is this a good approach, and do other (Open Source) projects do it the same way?