That sounds great! In fact, I see a lot of interesting script projects these days, yours I'll count among the top. Even if it's better to go for B9S (from an end user perspective), I'd very much like to see both scripts. When they're finished, of course.
"if" and "goto" will be coming, for else I'm still thinking (you can do everything "else" can with gotos).
OK, "goto" works just fine for me too. That's great news.
Well, I think I've got all of the bugs worked out. I've tested all the scripts and they seem to work very well. So, here's the whole installer (minus certain files that can't be included for obvious reasons). It's a good idea to have a second set of eyes look it over anyway.
For anyone else that wants to test this, feel free. I'd advise having NTRBootHax and/or a hard mod in case something goes wrong. I've tested them and they work for me, but I can't predict every setup out there. You may need to comment out or change the lines that install Luma to CTRNAND (UPDATE: these are now commented out so they won't run until you set them up). I did not include a copy of Luma because this is meant to work alongside a configuration that it gets copied over with, then get out of it's way, not act as a standalone. Also note that the B9S installer scripts are expecting to find a "boot.firm.bak" (which my unified configurations will include) to restore as "boot.firm" after the installation, and the script will fail at the cleanup section without this in place. The A9LH installer has no such requirement, but it's heavily advised to have an "arm9loaderhax.bin" before proceeding, because it will not set one up for you. I could include GM9 as one, but the whole idea is for this to install and then get out of the way of the configuration you presumably already put on the card before copying this over it (aside from doing it all in one, this also aims to avoid a second trip to the PC). So I prefer not to overwrite more files than necessary.
You may notice some extra files for older exploits in this as well. This should work fine with most regular *hax methods as long as you provide the keys needed (they're built in on the copy of GM9 I'm using, but I can't include that here for obvious reasons). My previous version of this worked just fine with Soundhax, so this should too. I even included "Oldloader.dat" for people still on MSET (not tested though). I want everyone that has a working exploit to be able to use this. And don't worry about it cluttering your card. The cleanup part of the script deletes it all.
To use the A9LH script, you will need to dump the secret sector and firm partitions from an existing clean A9LH install on the latest version via the S: drive. None of that multi-stage stuff can be present, either. If it is, you may need to zero it out via a hex editor. The firms must then be trimmed to their original sizes (995,328 and 991,232 respectively) so the hashes will match (for Windows there's a simple freeware app named "File Trimmer" that can do this, and any other OS should have "dd" of course). Place said files in the included "arm9loaderhax" folder and the installer should recognize them. I guess you could change the hashes, but these should be reproducible.
Also, I'd advise against using the "Dual Exploit" option. UPDATE: I've removed these since they're practically useless at this point. It won't break anything not having the folder there.
One last thing. If you want a backup of your original FIRMs and secret sector, they get copied to a folder in "gm9/out" by the scripts (so that wiping "boot9strap" doesn't delete them). They will use a different folder every time, also. So if you ran the A9LH one, then later ran the B9S one, you would have both retail and A9LH firm backups you could just copy back to S: if you ever wanted to go back. I actually made that part of the script more for my swap card, so I could have a backup for every install it does. But it works well, so, why change it?
EDIT: This project also needs a name. Calling it the "AIO CFW Pack" just seems boring, lackluster, and doesn't even scratch the surface of all it does now.
UPDATE7: Decided to make it possible to use this as a standalone installer to avoid complications. Installing Luma to CTRNAND is enabled now and should work without any modifications. Having a "boot.firm.bak" on the card when installing B9S is now optional. I'd still recommend it, because this does still reboot at the end. That's not something I plan to change, because it allows me to go straight into configuring Luma once the install completes.
UPDATE8: Switched from "allow -a S:/" to "allow S:/nand.bin" because the former wasn't working. Now the scripts should ask for permission before they do anything. Updated GM9 Build.
EDIT2: Some bugs I've observed in GM9 while testing this. Built-in keys do not seem to work when installing from the Soundhax->udsploit->Safehax method. The "sector0x96.bin" will not show up. With "aeskeydb.bin" it will. The latest build of GM9 is also not loading correctly from Oldloader on an N3DS running A9LH. It works fine on an O3DS, but I have to revert to 1.3.4 to get it to load on an N3DS for some reason. Also, "allow -a S:/" doesn't seem to work, but "allow S:/nand.bin" does. I'm guessing it's because of the drive's virtual nature?