#!/bin/bash

[[ -x ./gatherflat.local ]] && exec ./gatherflat.local "$@"

if [[ -d "$1" ]] ; then

SRC="$1"
DST="$2"

rm -f temp.f temp.l
if [[ ! -d "$DST" ]] ; then mkdir "$DST" ; fi
(cd "$SRC" ; find . -name CVS -prune -o -type f -print)|sed -e s@.@@>temp.f
awk '{print "./system_ln '"$SRC"'"$1" '"$DST"'";}' < temp.f > temp.l
sh temp.l
rm -f temp.d temp.l

fi
