xref: /plan9-contrib/sys/src/9/pcboot/bindpc (revision 25210b069a6ed8c047fa67220cf1dff32812f121)
1#!/bin/rc
2# bindpc pfx sfx - bind files from ../pc into .
3# creating lots of stubs with aux/stub bogs down eventually, alas.
4if (test -e etherigbe.c)
5	exit ''
6
7rfork e
8thisboot=`{basename `{pwd}}
9boot=../$thisboot
10echo bindpc $*
11pfx=$1
12sfx=$2
13
14# mostly for mk clean or *.clean
15if (~ $#pfx 0)
16	pfx=''
17if (~ $#sfx 0)
18	sfx=''
19
20bind -bc $boot $boot
21
22# duplicate $pfx as $pfx$sfx
23cfgs=`{ls -d $pfx^* | grep -v '\.|mkfile|'^$sfx^'$'}
24aux/stub -d /tmp/blank
25for (f in $cfgs)
26	aux/stub /tmp/blank/$f$sfx
27bind -a /tmp/blank .
28for (f in $cfgs)
29	bind $f $f$sfx
30bind -a ../pc $boot
31
32# bind systab.h ../port/systab.h
33exit ''
34