#!/bin/sh
#############################################################################
# Mklinks
#
# call from the 'ss' source directory as './Mklinks sun4'
#
# Based upon a similar script in the ``xntp3'' distribution by
# Lars Mathiesen (University of Copenhagen) <thorinn@diku.dk>
#############################################################################

# 1) Make destination directory.
#---------------------------------------------------------------------------
  mkdir $1

# 2) Make symbolic links in destination directory to all files
#    (not directories, and not "Makefile") in current directory.
#---------------------------------------------------------------------------
# find . ! -type d -a ! -name Config -print | sed "s-^\./--" | while read file
  find . -maxdepth 1 ! -type d -a ! -name Makefile -print \
	| sed "s-^\./--" | while read file
	do
		ln -s ../$file $1/$file
	done

  cp Makefile $1/Makefile

#---------------------------------------------------------------------------
#	End.
