Plan 9 from Bell Labs’s /n/sources/plan9/sys/src/9/pcboot/bindpc

Copyright © 2009 Alcatel-Lucent.
Distributed under the Lucent Public License version 1.02.
Download the Plan 9 distribution.


#!/bin/rc
# bindpc pfx sfx - bind files from ../pc into .
# creating lots of stubs with aux/stub bogs down eventually, alas.
if (test -e etherigbe.c)
	exit ''

rfork e
thisboot=`{basename `{pwd}}
boot=../$thisboot
echo bindpc $*
pfx=$1
sfx=$2

# mostly for mk clean or *.clean
if (~ $#pfx 0)
	pfx=''
if (~ $#sfx 0)
	sfx=''

bind -bc $boot $boot

# duplicate $pfx as $pfx$sfx
cfgs=`{ls -d $pfx^* | grep -v '\.|mkfile|'^$sfx^'$'}
aux/stub -d /tmp/blank
for (f in $cfgs)
	aux/stub /tmp/blank/$f$sfx
bind -a /tmp/blank .
for (f in $cfgs)
	bind $f $f$sfx
bind -a ../pc $boot

# bind systab.h ../port/systab.h
exit ''

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2009 Alcatel-Lucent. All Rights Reserved.
Comments to webmaster@plan9.bell-labs.com.