I have developed a few scripts to help organize my work. One of those which I am both proud of and frustrated by is my 'app' framework:
github.com
I chose shell scripting because it runs on all platforms and is essentially glue. The readme there alludes to the same. As much as most places want to get away from shell scripting, it is so prevalent that I find it useful to build a framework around it.
The intent with this is:
1. provide a framework to write applications
2. provide easy-to-read logging
3. provide common functionality across platforms [install, run scripts, install go apps, npm apps, etc. ]
4. support features that can be enabled automatically or via configuration
The list goes on and on.
Some of the 'apps' I've built with this are for configuration management, wrapping secrets providers, and wrapping common git actions I routinely perform. The more complicated apps I've built with it are an automated freebsd installer and an automated gentoo installer.
That said, some of the challenges I face are library import handling is fragile. I essentially hard-code libraries for the install app and for downstream apps, I can pull libraries in.
I suppose, I'm looking for some guidance, or a code review. While I have thought about migrating to an actual programming language like go or Java, I stay away from those because running go in my workplace is not immediately possible, and while Java is readily runnable at my workplace, it introduces additional scrutiny whereas a shell script does not.
That leads me to another option which is to write the core framework in go or Java and instead produce a shell script as the output. I'm fluent in both go and Java, so that isn't a problem. My problem is how best can I design a shell-script framework with the limitations it imposes? Using go or Java simplifies things a bit because there are many tools that allow me to essentially just focus on the problem, the implementation. Whereas, if I write in shell natively, it'd be like me trying to write a C compiler.
Thanks for the read.
GitHub - walterjwhite/install
Contribute to walterjwhite/install development by creating an account on GitHub.
I chose shell scripting because it runs on all platforms and is essentially glue. The readme there alludes to the same. As much as most places want to get away from shell scripting, it is so prevalent that I find it useful to build a framework around it.
The intent with this is:
1. provide a framework to write applications
2. provide easy-to-read logging
3. provide common functionality across platforms [install, run scripts, install go apps, npm apps, etc. ]
4. support features that can be enabled automatically or via configuration
The list goes on and on.
Some of the 'apps' I've built with this are for configuration management, wrapping secrets providers, and wrapping common git actions I routinely perform. The more complicated apps I've built with it are an automated freebsd installer and an automated gentoo installer.
That said, some of the challenges I face are library import handling is fragile. I essentially hard-code libraries for the install app and for downstream apps, I can pull libraries in.
I suppose, I'm looking for some guidance, or a code review. While I have thought about migrating to an actual programming language like go or Java, I stay away from those because running go in my workplace is not immediately possible, and while Java is readily runnable at my workplace, it introduces additional scrutiny whereas a shell script does not.
That leads me to another option which is to write the core framework in go or Java and instead produce a shell script as the output. I'm fluent in both go and Java, so that isn't a problem. My problem is how best can I design a shell-script framework with the limitations it imposes? Using go or Java simplifies things a bit because there are many tools that allow me to essentially just focus on the problem, the implementation. Whereas, if I write in shell natively, it'd be like me trying to write a C compiler.
Thanks for the read.