General TC > Programming & Scripting - Unofficial

Script to download extensions+dependencies on other Linux distros

<< < (9/9)

zharr:
Thank you very much tacpilot - as you might have guessed I am not that proficient in shell programming.
Though that means I can't use [[ ]] either, as it is not part of posix sh, right? Would you really recommend me to switch that?
I expect this script to be run on a Linux host, though even busybox supports [[ ]], so it should not be a big deal to use it right?
But yeah, making it compatible with tinyCore sounds like a good idea long term, so even people only using tinyCore can use it.
Actually sounds like a decent idea for my project, for people that want to build custom images for my embedded project but don't use linux, I can provide a tinyCore image to boot to that can be used to set up the embedded piCore image - genius!

tacpilot:

--- Quote ---Would you really recommend me to switch that?
--- End quote ---
The language you choose depends upon your target audience. The reason
basic shells are often coded to is for portability, or with TinyCore is for size.
Bash was evolved to expand the features avail for shell scripting. Things
like asociative arrays and REGEX features are nice to have access to in
a language. In the past bash was not avail for all operating systems. Now
days bash can be found everywhere.

It sounds like your code base is functioning as you envisioned. This means
you accomplished your goal without bash feature sets. This is a good thing
for portability, so don't feel like you have to change. Since it works, I would
just use the code checkers, follow their suggestions, and tweak your code
to become more inline with the standards. If nothing else, this would be an
educational experience in making clean code.

Since your target audience is for the TinyCore community, portability isn't really
an issue. It sounds like you plan to use this on a desktop system, and not some
small form factor embedded system. This means size shouldn't be an issue. So
if you want to switch, bash.tcz and its dependencies are avail in the repo for a
combined size of about 840K.


--- Quote ---I can provide a tinyCore image to boot to that can be used to set up the embedded piCore image
--- End quote ---
Now that is the power and beauty of TC.

It would be straight forward to create your own TC package for this. If you choose to
switch to bash, then just include it and its dependencies as requirements for your
FetchExt.tcz package.

Navigation

[0] Message Index

[*] Previous page

Go to full version