Yes it is safe to drive it home or to the repair shop. Once you turn it off you are dead in the water. It will take its toll on the alternator if you keep driving.
How long can you drive with a weak battery?
Unless your battery was also fscked you should've been able to go a lot longer than 5 minutes before your engine died. and in response to the question, yes a car can run with a dead battery, or a dead alternator (as long as the battery still has some charge), but not if both are dead.Oct 8, 2003
What should you do if your car battery is low?
The most common way to deal with a dead battery is by jump-starting it. All you need to jump-start a car is a set of jumper cables and another car (a good Samaritan) with a functional battery. Keep in mind that you should never try to jump-start a car if its battery is cracked and is visibly leaking acid.