#!/bin/sh
#
# link all files in the target tree, copying directory structure
# makes all absolute links

dest=`pwd`
cd $1
src=`pwd`

echo Linking from "$src" to "$dest"

for foo in *; do
  if [ -d $foo ]; then
    cd $dest
    if [ ! -d $foo ]; then mkdir $foo; fi
    cd $foo
    linktree "$src/$foo"
    cd $src
  else
    ln -s "$src/$foo" "$dest/$foo"
  fi
done


