Plan 9 from Bell Labs’s /n/sources/contrib/nemo/rc/bin/Ocp

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


#!/bin/rc

#
args=($1 $2)
cd /
from=`{echo $args | sed 's/ .*//'}
to=`{echo $args | sed 's/[^ ]* //'}
name=`{basename $from}
from=`{basename -d $from}

fromui=`{echo $from | sed 's|/devs/([a-zA-Z]*)/.*|\1|'}
toui=`{echo $to | sed 's|/devs/([a-zA-Z]*)/.*|\1|'}

echo Ocp $name from $from -$fromui- to $to -$toui- >>/sys/log/$sysname
test -d $from || 9fs $fromui || exit $status
test -d $to || 9fs $toui || exit $status
test -d $from || exit 'no from'
test -d $to || exit 'no to'
cd $from
tar c $name >[2]/dev/null | @{ cd $to ; tar x   } 

cd $to/$name
echo tag >ctl

(This is a user-contributed directory and
should not be interpreted as statement by Alcatel-Lucent.)

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.