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

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
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 © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.