[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / glafp-utils / scripts / lndir.man
1 .TH LNDIR 1 "Release 5" "X Version 11"
2 .SH NAME
3 lndir \- create a shadow directory of symbolic links to another directory tree
4 .SH SYNOPSIS
5 .B lndir
6 fromdir [todir]
7 .SH DESCRIPTION
8 .I Lndir
9 makes a shadow copy 
10 .I todir 
11 of a directory tree
12 .I fromdir, 
13 except that the shadow is not
14 populated with real files but instead with symbolic links pointing at
15 the real files in the 
16 .I fromdir
17 directory tree.  This is usually useful for maintaining source code for
18 different machine architectures.  You create a shadow directory
19 containing links to the real source which you will have usually NFS
20 mounted from a machine of a different architecture, and then recompile
21 it.  The object files will be in the shadow directory, while the
22 source files in the shadow directory are just symlinks to the real
23 files.
24 .PP
25 This has the advantage that if you update the source, you need not 
26 propagate the change to the other architectures by hand, since all
27 source in shadow directories are symlinks to the real thing: just cd
28 to the shadow directory and recompile away.
29 .PP
30 The
31 .I todir
32 argument is optional and defaults to the current directory.  The
33 .I fromdir
34 argument may be relative (e.g., ../src) and is relative to
35 .I todir
36 (not the current directory).
37 .PP 
38 .ft B
39 Note that RCS and SCCS directories are not shadowed.
40 .ft
41 .PP
42 Note that if you add files, you must run
43 .I lndir
44 again.  Deleting files is a more painful problem; the symlinks will
45 just point into never never land.
46 .SH BUGS
47 .I Patch
48 gets upset if it cannot change the files.  You should never run
49 .I patch
50 from a shadow directory anyway.
51 .PP
52 You need to use something like
53 .nf
54         find todir -type l -print | xargs rm
55 .fi
56 to clear out all files before you can relink (if fromdir moved, for instance).
57 Something like
58 .nf
59          find . \\! -type d -print
60 .fi
61 will find all files that are not directories.