Broceliande Hello. Thank you for working on these fixes. I ran your script on the most recent Batocera legacy build (5.23) and it succeeded in loading the NVIDIA drivers for my Geforce GT 550M, as it shows in the System Info menu.
Unfortunately there was still a slight hiccup: no emulator would load a game, and would simply return to the main menu shortly after starting. The issue is that multiple outputs were still enabled, and the issue is resolved by disabling all but one output with xrandr --output [output you want disabled] --off
. Gamecube games - and all others - now run flawlessly
I write this comment so that someone with a similar issue might resolve it quickly, and to sincerely thank you and everyone else ITT who helps others set their system up. Thank you and have a good day š