Alois Mahdal
be385bd497
Remove unnecessary imports
8 lat temu
Alois Mahdal
1fdb9cfeef
Satisfy ShellCheck recommendations
8 lat temu
Alois Mahdal
bcad50d4f2
Update for Shellfu v0.9.x
The new Shellfu brings some large changes. Among what touches us
directly:
* Most global variables were renamed (removing SHELLFU_* prefix).
* inigrep API has been revamped and the file merging/guessing
feature has been dropped; it now belongs to us.
8 lat temu
Alois Mahdal
7c8bae9038
Use predictable meta binary name
8 lat temu
Alois Mahdal
4173db5f3c
Add last git hash from application build time
8 lat temu
Alois Mahdal
d3ad15cd61
Replace last unique line in meta binary template
8 lat temu
Alois Mahdal
e1eacaa297
Move main() to the saturnin.sh module
8 lat temu
Alois Mahdal
b88948ca3d
Avoid exporting SATURNIN_SUBCOMMAND directly
Scripts may need it (eg. if using `saturnin__runhook()`) but exporting
it in the middle of main script makes it harder to see the scope
clearly and also is ugly.
Tweak the saturnin__runsc syntax so that it's not dependent on this
being global and export the SATURNIN_SUBCOMMAND only for the actual
subcommand binary call.
8 lat temu
Alois Mahdal
594e675521
Move usage() to saturnin.sh module
8 lat temu
Alois Mahdal
740f30e75e
Enclose main body to main()
Makes it easier to grok the structure and keep the global space clean.
8 lat temu
Alois Mahdal
6fddf11510
Sort variables alphabetically
Order does not matter, therefore use canonical order to simplify updates.
8 lat temu
Alois Mahdal
806e85fce7
No need to export app version
8 lat temu
Alois Mahdal
66c6c62c54
Add optional codename to version info
8 lat temu
Alois Mahdal
99770e4f06
Move version printing routine to saturnin.sh module
8 lat temu
Alois Mahdal
c2d010c69b
Update meta-data for new Mkit version
8 lat temu
Alois Mahdal
ac6b62e952
Use non-specific global names where possible
Use of app name when naming of global variables and/or mkit tokens makes
upgrade of the saturnin template painful and error-prone, while none of
these variables can be overriden from environment so the namespacing
advantage is vain.
8 lat temu
Alois Mahdal
ed7847f49b
Use proper naming scheme
8 lat temu
Alois Mahdal
2fb1fdbcf3
Rename saturnin_meta module
Since saturnin's dedication to be "meta-command" builder, the distinction
between "meta" and something else does not make much sense.
8 lat temu
Alois Mahdal
800ad3cf89
Update according to safer import style
8 lat temu
Alois Mahdal
91a55e625b
Update after renaming of ffoo to shellfu
8 lat temu
Alois Mahdal
a8652e2986
split off bmo: Rebrand a bit
9 lat temu
Alois Mahdal
0561811acc
split off bmo: Move moving parts
9 lat temu
Alois Mahdal
6e84d62826
split off bmo: Rewrite moving parts
9 lat temu
Alois Mahdal
8a5dd0f421
Make saturnin subcommand more portable
9 lat temu
Alois Mahdal
6e128ebffd
Apply ShellCheck advice
9 lat temu
Alois Mahdal
9da376f256
Rename saturnin_common to saturnin_meta
The routines are all basically related to the meta-command functions.
9 lat temu
Alois Mahdal
6abb8c6621
Move common saturnin routines to a module
This module is intended to be moved around with saturnin, but unlike
main meta-command (bin/saturnin.skel), it should not be necessary to
rename it or edit to adapt to new project.
9 lat temu
Alois Mahdal
066c22b204
Fortify hook routine
Add checks for syntax errors and missing SATURNIN_SUBCOMMAND. In both
cases, ignore the hook.
9 lat temu
Alois Mahdal
c80c7d4a00
Use inigrep__mkpath to assemble FFOO_INIGREP_PATH
Minimize the "built part" and code repetition among saturnin "clones".
9 lat temu
Alois Mahdal
ad3a74047a
Move colon delimiting to generator
9 lat temu
Alois Mahdal
1303a48cfa
Add internal (plumbing) ffrun wrapper
To allow for experimenting with functions from embedded library.
9 lat temu
Alois Mahdal
7f630aeb92
Add internal (plumbing) commands from ffoom
This should help test and manage embedded Fastfoo library
9 lat temu
Alois Mahdal
3d7aab77f2
Port to ffoo v0.8: usage_is renamed
9 lat temu
Alois Mahdal
47bfddf9f3
Port to ffoo v0.8: config.sh renamed
9 lat temu
Alois Mahdal
61c7eb02e1
Make use of FFOO_PRETTY_USAGE mode
9 lat temu
Alois Mahdal
6af447c64f
Add internal subcommand _ls_subcommands
9 lat temu
Alois Mahdal
12b62db27a
Port to ffoo v0.8: exit.sh renamed
9 lat temu
Alois Mahdal
6f23cfc46e
Explicitly sort modules (by C locale)
9 lat temu
Alois Mahdal
2bf4170cd7
Move out routine to find sub-modules
9 lat temu
Alois Mahdal
84b11f1ffa
Use more informative function name
9 lat temu
Alois Mahdal
1b7d7e32f1
Tidy up variable setting code
* Add docstring,
* add explanations for local variable names,
* separate export declarations,
* sort globals alphabetically,
* add built part delimiters,
* quote paths properly.
9 lat temu
Alois Mahdal
61c5e18427
Do not make up FFOO_PATH--take it from mkit directly
9 lat temu
Alois Mahdal
09a0a735c9
Use inigrep directly inside saturnin
... turns out it's faster (surprise! ;))
9 lat temu
Alois Mahdal
5cf1e53792
Join hooks from all paths
Due to inigrep limitation, we cannot automatically cherry-pick hook.ini
based on where the hook is found--we can only have all hooks in one
file, or use join strategy.
9 lat temu
Alois Mahdal
a0d7664f08
Implement support for sub-command hooks
Add section like this to hook.ini:
[hook.mycomm]
pre = echo $SATURNIN_SUBCOMMAND will run soon
pre = echo $SATURNIN_SUBCOMMAND is almost running
post = echo $SATURNIN_SUBCOMMAND has finished now
9 lat temu
Alois Mahdal
dfd3810eee
Move saturnin-conf to built-in
9 lat temu
Alois Mahdal
8470af0975
Improve subcommand listing for help string
9 lat temu
Alois Mahdal
a3216edab4
Quote subcommand on input
9 lat temu
Alois Mahdal
f9af1886a6
Fix debugging of arg list
"@" breaks the string to several arguments, which is not what we want
here
9 lat temu
Alois Mahdal
f31a28509b
Add support for printing simple SemVer version number
9 lat temu