diff options
| author | PS <p@0x53.net> | 2026-02-01 12:09:27 +0100 |
|---|---|---|
| committer | PS <p@0x53.net> | 2026-02-01 12:09:27 +0100 |
| commit | 570eff1d9e14fc2c3c20f47cc0419064b0eea76d (patch) | |
| tree | 841a433099df7f04b218c312f0a1824acfa80b59 /tools/gen-configure.el | |
| download | linux-supplements-570eff1d9e14fc2c3c20f47cc0419064b0eea76d.tar.gz linux-supplements-570eff1d9e14fc2c3c20f47cc0419064b0eea76d.tar.bz2 linux-supplements-570eff1d9e14fc2c3c20f47cc0419064b0eea76d.zip | |
version 0.1.0.0
Diffstat (limited to 'tools/gen-configure.el')
| -rwxr-xr-x | tools/gen-configure.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/gen-configure.el b/tools/gen-configure.el new file mode 100755 index 0000000..eba63fb --- /dev/null +++ b/tools/gen-configure.el @@ -0,0 +1,32 @@ +#!/command/execlineb -S0 + +# For dev use only. Don't run this, it overwrites your configure. + +# The quoting interactions in sed and sh make it impossible to get +# such a simple thing done. It's amazing how bad traditional Unix is. + +backtick -E TEMPLATE { redirfd -r 0 tools/configure.template s6-cat } +s6-envdir -Lf package/configure-snippets +multisubstitute +{ + importas -uS configure_help_install + importas -uS configure_help_dependencies + importas -uS configure_help_options + importas -uS configure_init_vars + importas -uS configure_case_lines + importas -uS configure_expand_dirs + importas -uS configure_slashpackage_other + importas -uS configure_extra_checks + importas -uS configure_generate_make + importas -uS configure_generate_configh +} + +if +{ + redirfd -w 1 configure.new + if { heredoc 0 ${TEMPLATE} s6-cat } + s6-echo +} + +if { s6-chmod 0755 configure.new } +s6-rename configure.new configure |
