#!/bin/sh
A='vax3 vax4 mips3 mips4'
F='local.h .login .profile if_sl.h'
P='asn1d dbg misc ra rad slip snmp snmpd uutty'

if [ $# -lt 1 ];then set $A ;fi

for a in $*
do	echo Architecture: $a
	for p in $P
	do	echo Package: $p
		for f in $F
		do	if [ -f $a/$p/$f -a -d src/$p ];then
				Ln $a/$p/$f src/$p/$a'_'$f
				ls -ldg src/$p/$a'_'$f
			elif [ -f $a/$p/$a'_'$f -a -d src/$p ];then
				Ln $a/$p/$a'_'$f src/$p/$a'_'$f
				ls -ldg src/$p/$a'_'$f
			fi
		done
	done
done
exit 0
#	LocalFiles [arch]...
#
# This little script runs througn a set of "architecture" directories,
# looking in each "package" subdirectory for files in the $F list.  If
# any are found, they are linked into  the  corresponding  src/package
# directory with the name of the architecture at the start.  Confused?
# Well, for example, if the script finds the files:
#	vax4/snmpd/local.h
#	vax3/slip/.login
#	mips4/ra/.local.h
# it will link these to the names:
#	src/snmpd/vax4_local.h
#	src/slip/vax3_.login
#	src/ra/mips4_local.h
# This will result in a merging of such files into a single  directory
# in  one  of  the two forms expected by the "LinkMy" script which the
# makefiles use.  It is used to merge the  "architecture"  directories
# into a single "src" directory.
