[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Really stupid use of cleanlinks



"Michael D. Schleif" <mds@helices.org> writes:

>    # Remove dangling symlinks and empty directories from a shadow link tree
>    # (created with lndir).

> What could be the purpose of this script?

As described in the script and manpage, it's to fix up a shadow link
tree that was created with lndir.  It's not a general tool!

The lndir manpage describes what the point is:

       The lndir program makes  a  shadow  copy  todir  of  a  directory  tree
       fromdir,  except  that  the shadow is not populated with real files but
       instead with symbolic links pointing at the real files in  the  fromdir
       directory tree.  This is usually useful for maintaining source code for
       different machine architectures.  You create a  shadow  directory  con-
       taining  links  to the real source, which you will have usually mounted
       from a remote machine.  You can build  in  the  shadow  tree,  and  the
       object files will be in the shadow directory, while the source files in
       the shadow directory are just symlinks to the real files.

       This scheme has the advantage that if you update the source,  you  need
       not  propagate the change to the other architectures by hand, since all
       source in all shadow directories are symlinks to the real  thing:  just
       cd to the shadow directory and recompile away.

-- 
Alan Shutko <ats@acm.org> - I am the rocks.
"I wish you luck on your journey." Tel



Reply to: