2 # Yet another script which requires an already built Bash.
4 # This makes links in the current directory to the directory specified as
10 if [ ! "$topdir" ]; then
11 echo "No directory specified. Read the script $0."
15 function clone_files ()
20 files=$(cd $dir; echo *);
22 if [ ! "$files" ]; then
26 for filename in $files; do
27 if [ -d $dir/$filename ]; then
28 # If the file to clone is this directory, then skip it.
29 if [ $(cd $dir/$filename; pwd) = $(pwd) ]; then
33 (cd $filename; clone_files ../$dir/$filename)
35 ln -s $dir/$filename .;
38 rm -f \#* *~ .*~ *.bak .*.bak *.tmp .*.tmp *.o core a.out;