You can run the numbers the cost isn't that bad to do it that way.
I think South Africa gets most of its diesel from the Fischer–Tropsch process. You could use electrolytic hydrogen as an input for that. About 40% of the energy in gasoline is from hydrogen burning.
It's not great but it would allow you to run current vehicles off about 40% solar energy.