The default script works good, other than I have to then go in and change the database prefix. I never played with the installer scripts, but skipping some of the options in the wordpress.pl file, I followed the path that ran for me to get to the options before install.
I was able to add in a table row that lets you either pick the default of wp_ or type in a prefix to use.
However, in the code that replaces values in the config file, the prefix comes out empty...
Anyone care to take a look? https://pastebin.com/xzD02MUa
Code added for the form is lines 107 and 108.
Code added to try to modify the prefix is at lines 265 (to try to get it from options, which is failing) and lines 288-290, which I believe is working, just that $prefix is empty.
Any help or pointers on where the option is getting lost, and any info on other parts of the script I should look at for things like upgrade and CLI running.