Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/9/port/mkrootall

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

rfork e
n=`{echo $#*^'%3' | hoc}
if(! ~ $n 0){
	echo 'usage: mkrootall [name cname file]...' >[1=2]
	exit usage
}

tmp=mkroot.$pid.out
fn sigexit {
	rm -f $tmp
}

allcname=()
while(! ~ $#* 0){
	name=$1
	cname=$2
	file=$3
	shift
	shift 
	shift
	allcname=($allcname $cname)
	cp $file $tmp
	t=`{file $tmp}
	# do not strip venti - it uses its own symbols
	if(~ $"t *executable* && ! ~ $name venti)
		strip $tmp
	aux/data2s $cname < $tmp
}
exit 0

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.