So I'm writing a small package manager, and a problem I've run into is making the symbolic links to files.
It installs the package to
/usr/pkg/name-version, and then reads a file to determine what symbolic links to make. I'm using
ln to make the links, and I've run into a problem when trying to install the Linux API headers.
I need to link the header files themselves, not the folders that contain them (so if 2 packages need to put files in the same subdirectory of include they can without screwing one package up).
That problem I solved, but
ln simply errors out if the path is incomplete, which is annoying because those directories shouldn't exist until the package is installed.
Is there a flag for
ln that will create any directories that are missing, or am I going to have to go with some convoluted bash script?