blob: 13105d5ec86622d535f7d0b3b996d5e4203208ec [file] [log] [blame]
#!/bin/sh
case $# in
0)
old=/usr/local/plan9
;;
1)
old=`cleanname $1`
;;
*)
echo 'usage: moveplan9.sh [oldpath]' 1>&2
exit 1
esac
new=`cleanname $PLAN9`
if [ X"$new" = X"" ]
then
echo cleanname failed 1>&2
exit 2
fi
cd $PLAN9
echo "
X ,s;$old(\$|/|});$new\\1;g
X/'/w
q
" | sam -d `cat lib/moveplan9.files` >/dev/null 2>&1