If you do a bi-fold door like
Scamp used to offer, The hinge side attaches to a strip of wood attached to the closet by the door. The other side has to have a curved piece cut to fit. In this photo you can also see there is a strip of wood tabbed to the
fiberglass under the rat fur to which it is screwed.
Here's one trick I saw used by someone else to make a cardboard template for a curved piece. Take measurements and cut a piece of cardboard that is an approximate fit for the curve (leave it wider than needed). Tape it in place. Take a piece of hose and lay it tightly against the shell next to the cardboard piece (this will take an extra pair of hands since you're working vertically). Trace along the hose to transfer the exact curve to the cardboard. If there are any gaps bigger than the width of the hose, you might have to repeat one more time. Once you have the curve right, then measure the width to cut the straight side.